更新时间:2022-10-21 22:38:43
不,你不能。如果用户想重新加载页面,则无法阻止他们。
Possible Duplicate:
Prevent any form of page refresh using jQuery/Javascript
how can i prevent user to reload (refresh) html page using javascript or jquery.
after loading the page for the first time, i want to prevent user reload the page either by press F5 or refresh from browser or by any way.
Can i do that?
Note: i try window.onbeforeunload
, but i didn't know how to stop window.onload event from it.
Any help?
No, you can't. If a user wants to reload a page you cannot stop them.