Closed whx closed 1 month ago
可以查询一下pjax的事件 其中包括点击 加载等相关事件 应该满足你的需求
Dcat.onPjaxLoaded(function(){
console.log(1);
});
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
我在一个数据表格页面加了一段js,我希望在跳转到别的页面的时候执行另一段js。由于是单页应用,所以常规的onbeforeunload事件不会触发,我现在的办法是在js里面监听页面特定的元素来判断是否已经跳转了页面。请教各位大佬,有没有更优雅的办法实现这一功能