简体   繁体   English

如何生成警报/弹出式窗口,提示在用户单击浏览器之前避免单击浏览器的后退按钮

[英]How can I generate an alert/pop-up saying avoid clicking back button of browser before user clicks it

由于我在应用程序中禁用了后退按钮,因此我希望用户不要在所有浏览器中单击它。

$('.button').hover(function(){ $('。button')。hover(function(){

alert("This button is not working"); alert(“此按钮不起作用”);

}); });

but you might like to just change the HREF of it, to href="#" , after clicking nothing will happen. 但是您可能只想单击它,然后便将其HREF更改为href="#"

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何只在单击按钮时才能加载此弹出窗口 - How can I make this pop-up to load only on clicking the button 当用户单击按钮时弹出一个窗口 - pop-up a window when the user clicks a button 如果用户未登录,如何生成弹出窗口? - How to generate a pop-up window if a user is not logged in? 当用户点击该弹出窗口外的页面上的任何位置时,如何关闭动态添加的弹出窗口? - How to close the dynamically added pop-up when user clicks anywhere on the page outside of that pop-up's surface? 如何强制弹出警报窗口 - How to force alert window to pop-up 如何在不单击任何按钮并获得用户响应的情况下显示C#代码后面带有“是”和“否”选项的弹出窗口 - How to display Pop-up with Yes and No option from C# code behind without clicking any button and taking response from user 如何使用Javascript在任何浏览器中取消阻止弹出窗口 - How can I unblock pop-up in any browser using Javascript 当我单击带有此代码的按钮时,如何显示弹出窗口:? - How can I display a pop-up when I click on a button with this code :? 警报弹出后未将焦点返回到浏览器 - Not returning focus to browser after alert pop-up 当鼠标悬停在浏览器栏/后退按钮上时,JavaScript弹出 - Javascript Pop-Up when Mouse Hovers toward Browser Bar/Back Button
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM