万千封印
有些人可能会觉得这很有用。只需将其粘贴到您的页面即可,您将获得一个在Chrome控制台(Ctrl+ Shift+ I)中触发事件的序列。$(document).on('pagebeforecreate',function(){console.log('pagebeforecreate');});$(document).on('pagecreate',function(){console.log('pagecreate');});$(document).on('pageinit',function(){console.log('pageinit');});$(document).on('pagebeforehide',function(){console.log('pagebeforehide');});$(document).on('pagebeforeshow',function(){console.log('pagebeforeshow');});$(document).on('pageremove',function(){console.log('pageremove');});$(document).on('pageshow',function(){console.log('pageshow');});$(document).on('pagehide',function(){console.log('pagehide');});$(window).load(function () {console.log("window loaded");});$(window).unload(function () {console.log("window unloaded");});$(function () {console.log('document ready');});您不会在控制台中看到卸载,因为在卸载页面时(当您离开页面时)会触发它。像这样使用它:$(window).unload(function () { debugger; console.log("window unloaded");});你会明白我的意思。