close

form 表單,在送出前的事件。

  window.onbeforeunload = confirmExit;
  function confirmExit()
  {
    return "You have attempted to leave this page.  If you have made any changes to the fields without clicking the Save button, your changes will be lost.  Are you sure you want to exit this page?";
  }

來源:onbeforeunload Demo

 

 

arrow
arrow

    Robert 發表在 痞客邦 留言(0) 人氣()