javascript “阻止此页面创建其他对话框”是什么意思?我现在应该怎么办?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/6581012/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-10-25 21:10:40  来源:igfitidea点击:

what does "prevent this page from creating additional dialogs" mean ? what should i do now?

javascriptalert

提问by Jamna

I just made 2 alert in my example.js file

我刚刚在我的 example.js 文件中发出了 2 个警报

alert("test-javascript1");
alert("test-javascript2");

警报(“测试javascript1”);
警报(“测试javascript2”);

nothing else in my file

我的文件中没有其他内容

and in my second alert box I got this message prevent this page from creating additional dialogs

在我的第二个警报框中,我收到此消息阻止此页面创建其他对话框

my question is why this message appears in second alert box and what should i do? should i click on that check box?

我的问题是为什么这条消息出现在第二个警报框中,我该怎么办?我应该点击那个复选框吗?

prevent this page from creating additional dialogs java script

阻止此页面创建额外的对话框 java 脚本

回答by Gabi Purcaru

That is a browser thing to help users get rid of annoying sites. If you click on that, alerts will still be fired, but you won't see them (which is not what you need if you are the developer).

那是浏览器的东西,可以帮助用户摆脱烦人的网站。如果你点击它,alerts 仍然会被触发,但你不会看到它们(如果你是开发者,这不是你所需要的)。

回答by sureshnakhate

The following steps show you how disable this Firefox feature:

以下步骤向您展示如何禁用此 Firefox 功能:

  1. Start Firefox, and type about:config in the url bar. Firefox will show the preferences screen. Please take care not to make changes at random.

  2. Right click in the preferences area, and choose New > Integer from the popup menu.

  3. In the dialog box that now appears, enter dom.successive_dialog_time_limit, followed by the value 0 (zero). Press OK.

  1. 启动 Firefox,然后在 URL 栏中输入 about:config。Firefox 将显示首选项屏幕。请注意不要随意更改。

  2. 右键单击首选项区域,然后从弹出菜单中选择“新建”>“整数”。

  3. 在现在出现的对话框中,输入 dom.successive_dialog_time_limit,后跟值 0(零)。按确定。

When you return to the Promasys WebCRF, this message will no longer appear when opening the same dialog box more than once.

当您返回 Promasys WebCRF 时,多次打开同一个对话框时将不再出现此消息。

回答by Ben

This alert has nothing to do with your code (apart from the fact that your alertcalls triggered it), it's functionality found in some browsers to prevent "run-away" alerts (because they're modal).

此警报与您的代码无关(除了您的alert调用触发它这一事实之外),它是某些浏览器中用于防止“失控”警报的功能(因为它们是模态的)。