離開頁面提示


很簡單的幾行程式碼就能夠解決 !
大部分的瀏覽器都能夠支援 !!
/*監聽事件*/
window.onbeforeunload = function()
    {
return ' What do you really want to leave the page? ';
    }

/*解除事件*/
window.onbeforeunload = null;

沒有留言:

張貼留言