2
我使用下面的代碼,以提示用戶,如果他離開了他頁不能回來。事情發生了,我想在特定時間後使用setTimeout函數重定向頁面。我想禁用檢查用戶在自動重定向開始時離開頁面。的Javascript卸載頁面條件
<script language="javascript" type="text/javascript">
needToConfirm = true;
window.onbeforeunload = askConfirm;
function askConfirm(){
if (needToConfirm){
return "Please note that you might not be able to come back and watch the movie again.";
}
}
</script>
的''的元件script'的language'屬性(已廢棄)(HTTP://www.w3 .ORG/TR/REC-HTML40 /交互/ scripts.html#edef-SCRIPT)。 – 2010-06-13 12:58:10