标签:
window.onbeforeunload方法在IE内核浏览器是有效的,但是在google浏览器中并不兼容,请教给位怎么在google浏览器中兼容window.onbeforeunload方法
window.onbeforeunload = function (e) {
e = e || window.event;
// For IE and Firefox prior to version 4
if (e) {
e.returnValue = ‘确定退出吗?‘;
}
// For Safari
return ‘确定退出吗?‘;
};
google浏览器window.onbeforeunload方法兼容问题
标签:
原文地址:http://www.cnblogs.com/xuan52rock/p/4505597.html