seaJS怎么根据IE判断使用jquery版本?
seajs.config({ base: "${pageContext.request.contextPath}/js/src/", alias: { <!--[if !IE]> "jquery": "jquery/jquery/jquery-2.1.1.js", <![endif]--> <!--[if IE] > "jquery": "jquery/jquery/jquery-1.11.1.js", <![endif]--> <!-- HTML5shiv and Respond.js for IE8 to support HTML5 elements and media queries --> <!--[if lte IE 8]> "html5shiv" : "html5shiv/html5shiv.js", "respond" : "respond/respond.js", <![endif]--> "bootstrap" : "bootstrap/bootstrap.js" } });
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
把变量提取到外面去啊var path = ...,另外 !IE其他浏览器不认,得把endif再双重注释掉。
<!--[if lt IE 9]>
var path="../../Scripts/JQuery/jquery-1.11.1.min.js";
<![endif]-->
<!--[if gte IE 9]>-->
var path = 。。。
<!--<![endif]-->
html5shiv respond也不适合延迟加载,直接全局引入好了,还有json2.js。IE6~8才需要的东西都全局引入好了,反正不会影响其他更加先进的浏览器。