(我修改了这篇文章以反射(reflect)下面的评论,现在在非安抚版本中发布错误。)
JQuery:/*! jQuery v1.8.3 jquery.com | jquery.org/许可证 */ 浏览器:在 Windows 8 Pro 上运行的 Internet Explorer (IE) v10
我正在从 SiteMaster 加载 jquery.min.js (v1.8.3)。
<body>
<form id="form1" runat="server">
<script type="text/javascript" src="/jquery/jquery-1.8.3.js"></script>
<script type="text/javascript" src="/jquery/jquery.bpopup-0.7.0.min.js"></script>
当使用 VS2012 中的本地 IE 窗口启动 Default.aspx 文件时,出现异常。
Exception was thrown at line 5301, column 6 in localhost:49928/jquery/jquery-1.8.3.js
0x800a139e - JavaScript runtime error: SyntaxError
If there is a handler for this exception, the program may be safely continued.
抛出异常的实际部分是:
if ( matches ) {
assert(function( div ) {
// Check to see if it's possible to do matchesSelector
// on a disconnected node (IE 9)
disconnectedMatch = matches.call( div, "div" );
// This should fail with an exception
// Gecko does not error, returns false instead
try {
matches.call( div, "[test!='']:sizzle" );
rbuggyMatches.push( "!=", pseudos );
} catch ( e ) {}
});
// rbuggyMatches always contains :active and :focus, so no need for a length check
rbuggyMatches = /* rbuggyMatches.length && */ new RegExp( rbuggyMatches.join("|") );
如果我按“继续”,页面就会加载。
堆栈跟踪: 匿名函数[jquery-1.8.3.js]第5301行 断言 [jquery-1.8.3.js] 第 3801 行 匿名函数 [jquery-1.8.3.js] 第 5293 行 匿名函数 [jquery-1.8.3.js] 第 5178 行 匿名函数 [jquery-1.8.3.js] 第 3669 行 全局代码[jquery-1.8.3.js]第14行
有什么想法吗?
最佳答案
我觉得你可以尝试加载依赖的方式
RequireJS 是一个 JavaScript 文件和模块加载器。它针对浏览器内使用进行了优化,但也可以在其他 JavaScript 环境中使用...
或者 /jquery/jquery.bpopup-0.7.0.min.js 是 jquery-1.8.3.js 的错误版本
关于javascript - jquery.min.js加载异常0x800a139e,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14086288/