处理“阻止此页面创建其他对话框”。 [英] Handle "prevent this page from creating additional dialogs."

查看:123
本文介绍了处理“阻止此页面创建其他对话框”。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何处理阻止此页面创建其他对话框。在javascript的警报提示中?



我尝试过:



我试过这个。但不行。任何其他...?



function alertWithoutNotice(message){

setTimeout(function(){

alert(message);

},1000);

}

How to handle "Prevent this page from creating additional dialogs." in alert prompt from javascript ?

What I have tried:

I tried with this. But not working. Any other...?

function alertWithoutNotice(message){
setTimeout(function(){
alert(message);
}, 1000);
}

推荐答案

某些浏览器提供该功能以允许用户以他们想要的方式控制他们的浏览器体验,并保护他们免受恼人的垃圾邮件实践。没有什么可以管理,如果用户使用这样的浏览器并且他们选择不看你的警报然后这是他们的选择,你就无能为力了。



如果这是一个问题,那么请远离警报,并使用jQuery UI对话框或类似方法实现基于html的消息框。
That functionality is provided by some browsers to allow the user to control their browser experience in a way they want, and to protect them from annoying spamming practices. There is nothing for you to "manage", if the user is using such a browser and they choose to not see your alerts then that is their choice, there is nothing you can do about it.

If it's an issue then move away from the alert and look to implement an html-based message box using jQuery UI dialog or similar.


引用:

用户不应该有权停止该警报。

User should not have the rights to stop that alert.



这是用户的计算机。他们有权做任何他们想做的事。您不应该期望有权使用警报消息无限制地轰炸用户。



此选项的添加正是为了防止这种滥用 - 网站阻止用户通过不断显示警报消息来关闭页面。



您的代码无法绕过此安全功能。


It's the user's computer. They have the right to do whatever they want. You should not expect to have the right to bombard the user with alert messages without restriction.

This option was added precisely to prevent this sort of abuse - sites preventing users from closing the page by constantly displaying alert messages.

There is no way for your code to circumvent this security feature.


这篇关于处理“阻止此页面创建其他对话框”。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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