本文介绍了dhtml中的树菜单的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述 29岁程序员,3月因学历无情被辞! 我一直在尝试将一个树状菜单添加到我的网站上,运气不错(更多 或更少)。我在simplethebest.net上遇到了一个脚本,但我似乎对它有问题...因为他们没有帮助部分, 这带来了我在这里。 脚本可以在 http://simplythebest.net/scripts/DHT...cript_100.html (无需登录或任何需要......我只是想到了剧本可能是 太长了,不能在这里重新发布) 问题: 它说更改号码22在行中 函数makeDatabase(){ outline = new makeArray(22) 到轮廓数加一。好吧,事实证明我要去b / b 需要大约40左右的大纲,但是当我将数字改为40或 41时(无论我加了多少加上一)它只在我的页面上显示前20个左右的b $ b轮廓,并且只是切断了其余部分。我还在学习 dhtml和javascript,所以我不知道还有什么我可以更改 它显示其他20something链接。 任何想法都会有所帮助。 谢谢! 解决方案 如果没有Javascript,不仅是菜单不起作用,它甚至不存在。 - Mark Parnell http://www.clarkecomputers.com.au 没有Javascript,不仅菜单不起作用,它甚至不存在。 我是否应该假设这意味着您的机器上禁用了脚本? 我不太确定我需要做什么来回应这个回复,因为它已经在我尝试过的每台浏览器/电脑上运行良好。 没有Javascript,菜单不仅不起作用,甚至不存在。 我应该假设这意味着你的机器上禁用了脚本吗?我不确定我需要做什么才能使用这个响应,因为它在每个浏览器/计算机上运行良好我''尝试过它。 客户端脚本必须在设计中假定。关闭它进行测试。 无论您使用的浏览器是否显示网站正常运行, 建议都允许UA忽略脚本。所以你的设计必须考虑到这个现实。 如果你必须使用客户端脚本来建立链接,提供一个真正的链接 替代方案,以便访问内容。 I''ve been trying to add a tree menu to my website with some luck (moreor less). I came across a script on simplythebest.net, but I seem tobe having a problem with it... and since they have no help section,this has brought me here.The script can be found at http://simplythebest.net/scripts/DHT...cript_100.html(no login or anything required... I just thought the script might betoo long to repost here)The problem:It says to change the number 22 in the linefunction makeDatabase() {outline = new makeArray(22)to the number of outlines plus one. Well, It turns out I''m going toneed around 40 or so outlines, but when I change the number to 40 or41 (however many I added plus one) it only shows the first 20 or sooutlines on my page and just cuts off the rest. I''m still learningdhtml and javascript, so I don''t know what else I can change to haveit show the other 20something links.Any thoughts would be most helpful.Thanks! 解决方案Without Javascript, not only does the menu not work, it doesn''t evenexist.--Mark Parnell http://www.clarkecomputers.com.au Without Javascript, not only does the menu not work, it doesn''t even exist.Should I assume this means you have scripts disabled on your machine?I''m not really sure what I need to do with this response since itsworked fine on every browser/computer I''ve tried it on. Without Javascript, not only does the menu not work, it doesn''t even exist. Should I assume this means you have scripts disabled on your machine? I''m not really sure what I need to do with this response since its worked fine on every browser/computer I''ve tried it on.Client side scripting must be assumed off in design. Test with it off.Whether or not the browsers you''ve used show the site to function, therecommendations allow UAs to ignore scripts. So your design must accountfor that reality.If you MUST use client-side scripting to make links, provide a real linkalternative so content can be accessed. 这篇关于dhtml中的树菜单的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 上岸,阿里云! 08-20 22:36