gpt4 book ai didi

javascript - html5 & javascriptmvc ie问题

转载 作者:行者123 更新时间:2023-11-30 18:48:46 25 4
gpt4 key购买 nike

为什么在使用 javascriptmvc 开发 html5 应用程序时在 ie6 中出现错误?

当我在标题中包含时出现问题:

<!--[if lt IE 9]>
<script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
<script src="js/libs/modernizr-1.6.min.js"></script>

然后在关闭正文之前:

<script type='text/javascript'
src='../steal/steal.js?appname,development'>
</script>

当我删除 html5shiv 时,该应用程序可以运行,但无法设置 html5 元素的样式。

最佳答案

如果您使用的是 Modernizr,则不需要 html5shiv,因为 Modernizr 本身包含相同的功能。

引自 Modernizr 主页:

Lastly, Modernizr also adds support for styling and printing HTML5 elements. This allows you to use more semantic, forward-looking elements such as <section>, <header> and <dialog> without having to worry about them not working in Internet Explorer.

关于javascript - html5 & javascriptmvc ie问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4596372/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com