块QUOT;停止此脚本&QUOT的执行;信息 [英] Block "stop execution of this script" message

查看:129
本文介绍了块QUOT;停止此脚本&QUOT的执行;信息的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有2000阵列,每个都在HTA 2000的值(以股票一个2000×2000的图像)在JavaScript的数组。我有这个code到考多少蓝色值在数组(数组的名称是图片

I have an array with 2000 arrays which each have 2000 values (to stock a 2000x2000 image) in javascript in an HTA. I have this code to test how many "blue" values there are in the array (the array's name is image):

var bluePixels = 0;
for(i = 0; i < image.length; i++){
     for(j = 0; j < image[i].length; j++){
          if(image[i][j] == "blue"){bluePixels = bluePixels + 1}
     }
}
alert(bluePixels);

问题是,它显示了一个消息,它说类似这个剧本?这个网页上的脚本正在放缓IE浏览器。如果继续,您的计算机可能没有回答停止执行。 (我不知道确切的话,因为我的电脑是法语),然后,如果我点击否,但它的警报(bluePixels)喜欢它应该,但如果我把是事实并非如此。我怎样才能阻止这个消息? (我知道有比如告诉用户在开始preSS不,但我想真正解决问题的解决方法)

The problem is that it shows a message where it says something like "Stop execution of this script? A script on this page is slowing down Internet Explorer. If it continues, your computer might not answer." (I'm not sure of the exact words because my computer is in French) and then, if I click on "no", it does the alert(bluePixels) like it should but if I push on "yes" it doesn't. How can I block this message? (I know that there are workarounds like telling the user in the beginning to press "no" but I want a real solution)

推荐答案

有关IE版本4到8,您可以在注册表中做到这一点。打开注册表编辑器以下项: HKEY_CURRENT_USER \\软件\\微软\\的Internet Explorer \\样式。如果该键不存在,创建它。在此项中,创建一个名为的DWORD值 MaxScriptStatements ,并给它的价值 0xFFFFFFFF的(不要担心,如果该值自动改变当你点击OK,这是正常的)。

For IE versions 4 to 8, you can do this in the registry. Open the following key in Regedit: HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Styles. If this key doesn't exist, create it. In this key, create a DWORD value called MaxScriptStatements and give it the value 0xFFFFFFFF (don't worry if the value changes automatically when you click on OK, that's normal).

您可以编写JavaScript来自动执行此操作:

You can program JavaScript to do this automatically:

var ws = new ActiveXObject("WScript.Shell");
ws.RegWrite("HKEY_CURRENT_USER\\Software\\Microsoft\\Internet Explorer\\Styles\\","");
ws.RegWrite("HKEY_CURRENT_USER\\Software\\Microsoft\\Internet Explorer\\Styles\\MaxScriptStatements",1107296255,"REG_DWORD");

这篇关于块QUOT;停止此脚本&QUOT的执行;信息的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆