阻止此页面创建其他对话框 [英] prevent this page from creating addional dialogs

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

问题描述

我已在多个链接的页面上添加了javascript.
我收到一条警告,提示您阻止此页面创建其他对话框,并带有一个复选框.我单击了一次框,现在该链接将不再具有弹出框.

此处是页面
在上面的链接上,您可以看到我在说什么.如果单击大多数链接,您将收到警告,而Andrew Digggs链接可以正确发送电子邮件而不会收到警告.

如果您继续单击其他链接,则会看到阻止"警告.

我想知道如何重置此设置,以便它们都可以再次工作和/或阻止该选项再次出现.

I have added javascript to a page on several links.
I get a warning that says prevent this page from creating addional dialogs and has a check box. I clicked the box once and now that link will not have popup box work again.

Here is the page
On the link above you can see what I am talking about. If you click most of the links you will get a warning and andrew driggs link does right to email without getting the warning.

If you keep clicking other links you will see the prevent warning.

I like to know how can I reset this so they all work again and / or prevent that option to show up again.

推荐答案

警告消息框的大量使用不是'很好的做法.

如果您的实施迫使浏览器警告您的用户,则应很好地表明您做错了事.

我的建议是修改网页的可见内容,而不要使用警报框.

以下是一个简单的html,可用于清空页面内容并显示一条消息,因为我已经在回复文本框中编写了它,所以可能需要进行一些调整,但是您已经有了大致的了解.

Heavy use of alert message boxes aren''t a very good practice.

If your implementation is forcing browsers to warn your users this should be a good indication that you''re doing something wrong.

My advice would be to modify the visible content of the web page instead of using alert boxes.

The following is a simple html which can be used to blank out the page content and display a message, it may need some tweaking as I''ve written it in the reply textbox, but you get the general idea.

<script language="javascript" type="text/javascript">
function showPopUp() { document.getElementById('popUpDiv').style.display = ''; }
function hidePopUp() { document.getElementById('popUpDiv').style.display = 'none'; }
</script>
<div id="popUpDiv" style="z-index: 10000; text-align: center;">
<div style="removed: absolute; removed 0px; removed 0px; removed 0px; removed 0px; background: #000000; opacity: 0.5;">
</div>
<div id="message" style="margin: 0 auto; width: 300px; removed: absolute; removed 100px; background: #ffffff;">
This is your message content.
<input type="button" value="close"  önclick="hidePopUp();" />
</div>
</div>


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

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