开发者

javascript event when you hit 'back' onto the page? [duplicate]

开发者 https://www.devze.com 2023-01-20 16:23 出处:网络
This question already has answers here: 开发者_JAVA百科 Is there a cross-browser onload event when clicking the back button?
This question already has answers here: 开发者_JAVA百科 Is there a cross-browser onload event when clicking the back button? (15 answers) Closed 9 years ago.

What event can i use to run code when a user visits another page then hits back to load my page again?

I wrote window.onload = function() { ... and it works when i hit refresh but not forward then back.


This jQuery plugin is pretty good. http://www.asual.com/jquery/address/docs/

And here's some info on the underlying JavaScript events involved in it's implementation http://www.hunlock.com/blogs/Mastering_The_Back_Button_With_Javascript

0

精彩评论

暂无评论...
验证码 换一张
取 消