📜  如何在窗口关闭时运行函数javascript代码示例

📅  最后修改于: 2022-03-11 15:02:17.585000             🧑  作者: Mango

代码示例1
window.onbeforeunload = closingCode;
function closingCode(){
   // do something...
   return null;
}