开发者

How do I receive an event when user presses Back button using jQuery

How can I receive an event when the user clicks the back button in IE, Mozila, and other browsers (using jQuery)? I want to do something when the user click on the back button [Browser Back Button].

I have to add something I开发者_JS百科 need to do something when it is handled like $.ajax I don't know is there any way ?

I mean receive an event when the user does it.


Based on your updated question, I'd say the jQuery history plugin is exactly what you're after, check it out here. Specifically, you can find the $.ajax() demo here.


I think you want to use the .unload event in jquery. It's not specific to the back button though, just to the fact that you're leaving the page

jquery documentation here.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜