如何禁用此警报 [英] how to disable this alert

查看:116
本文介绍了如何禁用此警报的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何使用javascript禁用阻止此页面创建其他对话框警报。

how to disable "prevent this page from creating additional dialogs" alert using javascript.

推荐答案

嗨Balaji,



这是一个浏览器功能,旨在保护用户,如果您可以将其关闭,所有那些通过对话框向用户发送垃圾邮件的网站都有办法阻止它。



所以简而言之,没有。



好​​的 -

如果你不满意有了上面的答案,你想继续禁用,那么你也有一个选项 - 这是CodeProject伙伴;-)



重建的步骤:

Hi Balaji,

This is a browser feature and is intended to protect the user, If you could turn it off, all those sites spamming users with dialogs would have a way to stop it.

So in short, no.

Okay -
If you are not satisfied with the above answer and you want to go ahead and disable, then also you have an option - this is CodeProject buddy ;-)

Steps to recreate:
alert('Alert1');
alert('Alert2');



显示Alert2,以防止此页面创建其他对话框烦人的复选框

现在将上面的代码更改为


Alert2 is displayed with that prevent this page from creating additional dialogs annoying checkbox
Now change the above code into

alert('Alert1');
setTimeout(function(){
        alert('Alert2');
    }, 1000);



现在你不会在第二次连续警报中看到恼人的消息及其复选框



注意:不要减少超时值,如果它在1秒内,则浏览器会自动将该警告添加到警报。



希望这会对你有所帮助。



问候,

RK


Now you wont see that annoying message and its checkbox in the second consecutive alert

Note: Dont reduce the timeout value, if its with in 1sec then browser will automatically add that warning to the alert.

Hope this helps you a bit.

Regards,
RK


这篇关于如何禁用此警报的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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