[英]IE hanging on js errors
The page hangs for a long time in IE but Chrome/FF power right through it. 该页面在IE中可挂起很长时间,但Chrome / FF可以直接通过它挂起。
Here's the page in question http://174.120.239.48/~peakperf/ 这是有问题的页面http://174.120.239.48/~peakperf/
============= =============
Webpage error details 网页错误详细信息
User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64; Trident/4.0; SLCC2; .NET CLR 2.0.50727; Media Center PC 6.0; .NET4.0C; .NET4.0E; .NET CLR 3.5.30729; .NET CLR 3.0.30729) Timestamp: Mon, 7 Mar 2011 21:18:49 UTC 用户代理:Mozilla / 4.0(兼容; MSIE 8.0; Windows NT 6.1; WOW64; Trident / 4.0; SLCC2; .NET CLR 2.0.50727; Media Center PC 6.0; .NET4.0C; .NET4.0E; .NET CLR 3.5 .30729; .NET CLR 3.0.30729)时间戳:2011年3月7日星期一21:18:49 UTC
Message: Not implemented 讯息:未执行
Line: 432 Char: 7 Code: 0 URI: http://174.120.239.48/~peakperf/wp-content/themes/strausberg/js/jquery.simplemodal-1.4.1.js 行:432字符:7代码:0 URI: http : //174.120.239.48/~peakperf/wp-content/themes/strausberg/js/jquery.simplemodal-1.4.1.js
========== ==========
Here's the pastebin of the js: http://pastebin.com/xXaCK6XH 这是js的pastebin: http : //pastebin.com/xXaCK6XH
Here's the js in question: http://174.120.239.48/~peakperf/wp-content/themes/strausberg/js/jquery.simplemodal-1.4.1.js 这是有问题的js: http : //174.120.239.48/~peakperf/wp-content/themes/strausberg/js/jquery.simplemodal-1.4.1.js
Thank you! 谢谢!
You need to make sure any Javascript (jQuery) that manipulates the DOM happens in the ready() event of the document
. 您需要确保任何用于操作DOM的Javascript(jQuery)都发生在
document
的ready()事件中。
In several places in your HTML, you're modifying the DOM right when the script tag gets parsed. 在HTML的多个位置,您都在解析script标记后立即修改DOM。 Now, if you look in the IE dev toolbar, you'll notice the following:
现在,如果您在IE dev工具栏中查看,将会注意到以下内容:
SCRIPT16385: Not implemented
jquery.simplemodal-1.4.1.js, line 432 character 7
LOG: [cycle] DOM not ready, queuing slideshow
LOG: [cycle] DOM not ready, queuing slideshow
LOG: [cycle] DOM not ready, queuing slideshow
LOG: [cycle] terminating; too few slides: 0
LOG: [cycle] terminating; zero elements found by selector
I think the offending Javascript is: 我认为令人反感的Javascript是:
<Script type="text/javascript">
jQuery(".basic").modal({overlayClose:true});
</script>
Which should be changed to: 应更改为:
<script type="text/javascript">
jQuery(document).ready(function() {
jQuery(".basic").modal({overlayClose:true});
});
</script>
这个网站说IE8不支持函数( removeExpression
),因为它已被弃用: http : removeExpression
Just ran into this issue, was using a reserved JS word and IE was throwing this error. 刚遇到这个问题,使用的是保留的JS单词,而IE抛出此错误。 :|
:| Hope it helps!
希望能帮助到你!
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.