gpt4 book ai didi

javascript - Firebug Lite 无法在 IE8 中工作 - 访问被拒绝

转载 作者:行者123 更新时间:2023-11-28 09:35:21 27 4
gpt4 key购买 nike

  1. 如标题所述,Firebug Lite 1.4 , 1.3最新在 IE 8.0.6001 中抛出错误页面加载时。 Firebug 文件在本地使用。

  2. 使用在线文件时http://getfirebug.com/firebug-lite.js我收到几次警报,内容如下:Stop running this script? A script on this page is causing Internet Explorer to run slowly. If it continues to run, your computer might become unresponsive.当点击等待脚本时,5次警报后,它起作用了。

无论如何该怎么办?

<小时/>

编辑:

我只在 IE 上使用 Firebug:

if(isset($_GET['firebug']) && preg_match('/MSIE/i',$_SERVER['HTTP_USER_AGENT'])) {
// $strFirebugLite = "<script type='text/javascript' src='../../client/lib/firebug-lite/firebug-lite.js'></script>";
$strFirebugLite = "<script type='text/javascript' src='http://getfirebug.com/firebug-lite.js'></script>";
}

然后我将字符串添加到我的页面。没有绑定(bind)Firebug,一切正常。

<小时/>

编辑2:

也许问题不清楚:问题不是我的自定义JavaScript代码,而是Firebug本身的使用,添加了<script> ...到我的页面。

<小时/>

编辑3:

     <html><head><title>Title</title>

<link id="visiLibSkin" rel="stylesheet" type="text/css" href="skin/03/style.css">
<style id="ext_style"></style>
<script language="JavaScript" src="../../client/visiSkin.js" type="text/javascript"> </script>
<script language="JavaScript" src="../../client/visiFunc01.js" type="text/javascript"> </script>
<script language="JavaScript" src="../../client/visiClass01.js" type="text/javascript"> </script>
<script language="JavaScript" src="../../client/julz_visiWizard.js" type="text/javascript"> </script>
<script language="JavaScript" src="skin/03/style.js" type="text/javascript"> </script>
<script type='text/javascript' src='http://getfirebug.com/firebug-lite.js'></script>
<link rel="stylesheet" href="../../client/lib/extjs/resources/css/ext-all-gray-scoped.css" type="text/css"/>
<script type="text/javascript" src="../../client/lib/extjs/ext-all-debug.js"></script>
<script type="text/javascript" src="../../client/lib/x/loader.js"></script>
<script type="text/javascript" src="../../client/lib/deftjs/deft.js"></script>
<script type="text/javascript" src="../../client/lib/x/x.js"></script>
<script type="text/javascript" src="../../client/lib/x/test.js"></script>
<link rel="stylesheet" href="../../client/lib/codemirror/lib/codemirror.css" type="text/css"/>
<link rel="stylesheet" href="../../client/lib/codemirror/lib/util/simple-hint.css" type="text/css"/>
<script type="text/javascript" src="../../client/lib/codemirror/lib/codemirror.js"></script>
<script type="text/javascript" src="../../client/lib/codemirror/mode/xml/xml.js"></script>
<script type="text/javascript" src="../../client/lib/codemirror/lib/util/closetag.js"></script>
<script type="text/javascript" src="../../client/lib/codemirror/lib/util/formatting.js"></script>
<script language="JavaScript" src="skin/03/visiCalendar.js" type="text/javascript"> </script>
<小时/>

编辑4:

我现在也收到错误,即 line 1354 char 131 中的对象不支持属性或函数(使用 http://getfirebug.com/firebug-lite.js )

注意:我还没有在 Firebug 中执行任何操作,只是加载我的页面。

最佳答案

我需要查看代码,但看起来您有一些代码运行缓慢......如错误所述。现代浏览器已经优化了 JavaScript 引擎,并且很可能避免您在 IE8 中看到的情况。

Internet Explorer monitors the number of statements that have been executed by a script. When a maximum number of statements have been executed, 5 million by default, the long-running script dialog is displayed

Nick Zakas 很好地解释了一些原因 here :

Too much DOM interaction

DOM manipulation is more expensive than any other JavaScript process. Minimizing DOM interactions significantly cuts the JavaScript runtime. Most browsers update the DOM only after the entire script has finished executing, which slows the perceived responsiveness of the web page to the user.

Loops that do too much

Any loop that either runs too many times or performs too many operations with each iteration can cause long-running script issues. It helps separate out functionality whenever possible. The effect is worsened when loops are used to perform DOM manipulations, sometimes causing the browser to completely freeze without ever showing the long-running script dialog.

Too much recursion

JavaScript engines put a limit on the amount of recursion that scripts can use. Rewriting the code to avoid recursion helps ameliorate the issue.

关于javascript - Firebug Lite 无法在 IE8 中工作 - 访问被拒绝,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13159470/

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