javascript下拉菜单:如何链接到不同的网站?
我是一名大学生,试图为我的教授创建一个下拉菜单。由于我没有任何编程背景,我找到了一个名为 "SoThink DHTML" 的程序为我生成了一个代码,但其中有一些错误我不知道如何修复。
总体而言,菜单应包含“主页”、“研究”选项卡(3 个子选项卡:“研究项目”、“系统和方法”以及“图像和电影”)、“出版物”、“实验室成员”、“链接”、 ”和“联系我们。”但是,自动生成的代码不提供其中一些标题的链接,我想知道如何手动插入链接?
如何插入路径,以便它们不引用特定文件,但当我移动包含网站的文件夹时更灵活?
我希望这有意义..
非常感谢您提前提供的帮助!
stm_bm(["menu1c53",960,"","blank.gif",0,"","",1,0,250,0,1000,1,0,0,"","100%",0,0,1,2,"default","hand","",1,25],this);
stm_bp("p0",[0,4,0,0,0,0,0,15,100,"",-2,"",-2,50,0,0,"#999999","transparent","line1.gif",3,0,0,"#000000"]);
stm_ai("p0i0",[0,"Home","","",-1,-1,0,"","_self","","","","",0,0,0,"","",0,0,0,1,1,"#E6EFF9",1,"#E6EFF9",1,"","line2.gif",1,3,0,0,"#E6EFF9","#000000","#426b10","#426b10","bold 9pt Verdana","bold 9pt Verdana",0,0,"","line2.gif","","line2.gif",2,2,42],100,0);
stm_aix("p0i1","p0i0",[0,"Research","","",-1,-1,0,"","_self","","","","",0,0,0,"arrow1.gif","arrow2.gif",15,9],100,0);
stm_bp("p1",[1,4,0,-3,6,0,5,0,100,"progid:DXImageTransform.Microsoft.RandomDissolve(,enabled=0,Duration=0.30)",12,"",-2,80,0,0,"#999999","#beeb94","",3,0,0,"#CCCCCC","",-1,-1,0,"transparent","",3,"",-1,-1,0,"transparent","",3,"line3.gif",-1,-1,0,"transparent","line3.gif",3,"",-1,-1,0,"transparent","",3,"","","","",1,1,1,1,1,1,1,1]);
stm_ai("p1i0",[0,"Research Projects","","",-1,-1,0,"./Research_Projects.html","_self","","","","",5,1,0,"","",0,0,0,0,1,"#E6EFF9",1,"#edf9e1",0,"","",3,3,0,0,"#E6EFF9","#000000","#426b10","#426b10","7pt Verdana","7pt Verdana",0,0,"","","","",0,0,0],0,20);
stm_aix("p1i1","p1i0",[0,"Systems and Approaches","","",-1,-1,0,"./Systems_and_Approaches.html"],0,20);
stm_aix("p1i2","p1i0",[0,"Images and Movies","","",-1,-1,0,"./Images_and_Movies.html"],0,20);
stm_mc("p1",[7,"#1E1E1E",1,2,"",3]);
stm_ep();
stm_aix("p0i2","p0i0",[0,"Publications","","",-1,-1,0,"#"],100,0);
stm_aix("p0i3","p0i2",[0,"Lab Members"],100,0);
stm_aix("p0i4","p0i2",[0,"Links"],100,0);
stm_aix("p0i5","p0i2",[0,"Contact Us"],100,0);
stm_ep();
stm_em();
I'm a college student trying to create a drop-down menu for my professor. Since I don't have any programming background, I found a program called "SoThink DHTML" that generated a code for me, but there are some errors within that I don't know how to fix.
The menu, overall, should have tabs to "Home," "Research" (3 subtabs: "Research Projects," "Systems and Approaches," and "Images and Movies"), "Publications, "Lab Members," "Links," and "Contact Us." The automatically generated code, however, doesn't provide links to some of these titles, and I was wondering how can I insert the links manually?
How can I insert the paths so that they do not refer to specific files, but are more flexible when I move the folder containing the website?
I hope that this makes some sense..
Thank you so much for your help in advance!!
stm_bm(["menu1c53",960,"","blank.gif",0,"","",1,0,250,0,1000,1,0,0,"","100%",0,0,1,2,"default","hand","",1,25],this);
stm_bp("p0",[0,4,0,0,0,0,0,15,100,"",-2,"",-2,50,0,0,"#999999","transparent","line1.gif",3,0,0,"#000000"]);
stm_ai("p0i0",[0,"Home","","",-1,-1,0,"","_self","","","","",0,0,0,"","",0,0,0,1,1,"#E6EFF9",1,"#E6EFF9",1,"","line2.gif",1,3,0,0,"#E6EFF9","#000000","#426b10","#426b10","bold 9pt Verdana","bold 9pt Verdana",0,0,"","line2.gif","","line2.gif",2,2,42],100,0);
stm_aix("p0i1","p0i0",[0,"Research","","",-1,-1,0,"","_self","","","","",0,0,0,"arrow1.gif","arrow2.gif",15,9],100,0);
stm_bp("p1",[1,4,0,-3,6,0,5,0,100,"progid:DXImageTransform.Microsoft.RandomDissolve(,enabled=0,Duration=0.30)",12,"",-2,80,0,0,"#999999","#beeb94","",3,0,0,"#CCCCCC","",-1,-1,0,"transparent","",3,"",-1,-1,0,"transparent","",3,"line3.gif",-1,-1,0,"transparent","line3.gif",3,"",-1,-1,0,"transparent","",3,"","","","",1,1,1,1,1,1,1,1]);
stm_ai("p1i0",[0,"Research Projects","","",-1,-1,0,"./Research_Projects.html","_self","","","","",5,1,0,"","",0,0,0,0,1,"#E6EFF9",1,"#edf9e1",0,"","",3,3,0,0,"#E6EFF9","#000000","#426b10","#426b10","7pt Verdana","7pt Verdana",0,0,"","","","",0,0,0],0,20);
stm_aix("p1i1","p1i0",[0,"Systems and Approaches","","",-1,-1,0,"./Systems_and_Approaches.html"],0,20);
stm_aix("p1i2","p1i0",[0,"Images and Movies","","",-1,-1,0,"./Images_and_Movies.html"],0,20);
stm_mc("p1",[7,"#1E1E1E",1,2,"",3]);
stm_ep();
stm_aix("p0i2","p0i0",[0,"Publications","","",-1,-1,0,"#"],100,0);
stm_aix("p0i3","p0i2",[0,"Lab Members"],100,0);
stm_aix("p0i4","p0i2",[0,"Links"],100,0);
stm_aix("p0i5","p0i2",[0,"Contact Us"],100,0);
stm_ep();
stm_em();
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
看起来您正在使用相对网址,它根据当前位置查找文件。因此,当包含 url 的文件位于不同位置时,它们的含义不同。
绝对网址从网站的根目录开始,这意味着您可以将包含它们的文件移动到任何位置,但它仍然引用相同的位置。
更多关于差异的信息(警告,了解技术)。
It looks like you are using relative urls, which find a file based on the current location. Therefore they mean different things when the file containing the urls is in different places.
absolute urls start from the root of the website, which means you can move the file containing them anywhere and it will still refer to the same location.
more on the difference (warning, get technical).