Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
如果我改变
$(document).on('pageshow',myFunction);
到
$(document).on('pageload',myFunction);
并刷新页面,页面加载功能永远不会触发。我在想什么错?
pageload事件仅针对从网络通过 AJAX 加载的页面触发。
如果您希望为已经嵌入 HTML 文档的页面调用处理程序,则可以绑定到pageinit:
$(document).on("pageinit", myFunction);