在关闭弹出窗口之前显示警报消息
我有一个弹出窗口,其中包含是或否问题(单选按钮)。我想强制我的网站的用户在关闭弹出窗口之前选择其中一个选项,但我无法这样做。我可以使用弹出窗口上的“红色”十字按钮简单地关闭弹出窗口。
谁能告诉我如何阻止用户从此页面导航?有没有办法显示警报消息并要求他们选择一个选项?
我正在使用 C#.net、asp.net 和 JavaScript。
I have a popup with a yes or no question (radiobuttons) in it. I want to force the users of my site to select either one of the options before closing the popup, but i am not able to do so. I can simple close the popup using the 'RED' cross button on the popup.
Can anyone tell me how can i stop the users from navigating from this page? Is there a way to display a alert message and ask them to choose an option?
I am using C#.net, asp.net and JavaScript.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
没有 100% 的方法来吸引您网站的用户...您可以显示一个自制的弹出窗口,如下所示
插入弹出窗口后,必须重新加载所需的 javascript 以便单击此按钮之一...
There is no 100% way to hold the user of your site... You could show a selfmade popup something like this
After the insert of your popup ho have to reload the needed javascript for handel the click to one of this buttons...