js页面关闭提示
2017-10-11 本文已影响0人
花花0825
js:
function checkLeave() {
event.returnValue="确定离开当前页面吗?";
}
html:
<body onbeforeunload="checkLeave()">
function checkLeave() {
event.returnValue="确定离开当前页面吗?";
}
<body onbeforeunload="checkLeave()">