scriptaculous 下拉菜单在 IE 中不起作用
我正在使用 http://www.wappler.eu/swdropdownmenu/ 中的下拉菜单在除 IE 之外的所有浏览器中都可以正常工作。网站上的演示可以在 IE 中工作,我唯一改变的是样式。我的位于 http://www.futureworkinstitute.com/2010/ - 起初我认为这可能是 scriptaculous/prototype/jquery 之间的冲突,但即使删除其他 JS 后,它还是不行。
I'm using the dropdown menu from http://www.wappler.eu/swdropdownmenu/ and it works fine in all browsers except IE.. the demo on the website works in IE, and the only thing i've changed is the styling.. mine is at http://www.futureworkinstitute.com/2010/ - at first i thought it might have been a conflict between scriptaculous/prototype/jquery, but even after removing other JS, it still doesnt work.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
问题是您的网站上没有包含 doctype。
除了少数例外,您创建的每个新页面的第一行应该是这样的,即 HTML5 文档类型:
因为您还没有包含文档类型,所以您的页面将在 IE8 中的Quirks 模式:
如果您添加那个神奇的文档类型行,您的下拉菜单将在 IE8 和 IE7 中运行。
我没有注意到添加文档类型会产生任何明显的令人不快的副作用,但添加它后,您应该在您关心的每个浏览器中测试整个网站,以确保您的网站仍然正常工作。
The problem is that you have not included a doctype on your website.
With few exceptions, the first line of every new page you create should be this, the HTML5 doctype:
Because you haven't included a doctype, your page is rendering in Quirks mode in IE8:
If you add in that magical doctype line, your drop down works in IE8 and IE7.
I did not notice any significant unpleasant side effects by adding in the doctype, but after adding it, you should test your entire site in every browser you care about to make sure your site still works properly.