Pra*_*jar 5 html javascript jquery refresh preventdefault
我想阻止用户刷新页面,如何做到这一点?我一直在使用e.preventDefault方法,但它运行不正常。
您甚至可以使用 window.onbeforeunload 。
window.onbeforeunload = function() {
return "you can not refresh the page";
}
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
19558 次 |
| 最近记录: |