开发者

message window triggered by browser back / window close

开发者 https://www.devze.com 2023-01-07 03:40 出处:网络
Im a php developer interested in going a little more client side. I nee开发者_运维知识库d to find a way to create some kind of dialogue when either the browser back or window close buttons are hit. Ca

Im a php developer interested in going a little more client side. I nee开发者_运维知识库d to find a way to create some kind of dialogue when either the browser back or window close buttons are hit. Can you give me an idea of the best way to go about this.

Many thanks Giles


Here's a good place to start: https://developer.mozilla.org/en/DOM/window.onunload.


I think you want the 'onbeforeunload' event, or 'onunload'.

Some discussion here

For a dialog, I would look at the dialog widget from Jquery UI.

0

精彩评论

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