欧美bbbwbbbw肥妇,免费乱码人妻系列日韩,一级黄片

離開當(dāng)前頁面前使用js判斷條件提示是否要離開頁面

 更新時間:2014年05月02日 14:37:37   作者:  
這篇文章主要介紹了離開當(dāng)前頁面前如何使用js判斷條件提示是否要離開頁面,需要的朋友可以參考下
復(fù)制代碼 代碼如下:

<!doctype html>
<html lang="cn">
<head>
<meta charset="UTF-8">
<meta name="Keywords" content="">
<meta name="Description" content="">
<title>js離開當(dāng)前頁面前判斷條件提示是否要離開頁面</title>
<script type="text/javascript">
window.onbeforeunload = function()
{
var unloads = document.getElementById("unloads").value;
if(unloads == null || unloads == ""){
return "您確定要退出頁面嗎?";
}
}
</script>
</head>
<body>
<input type="text" id="unloads" name="unloads" value="" />
</body>
</html>

相關(guān)文章

最新評論