[url]http://bytes.com/topic/javascript/insights/825556-using-onbeforeunload-javascript-event[/url]
"Please remember that the window.onbeforeunload event is fired every time the page is about to unload. [color=red]This means that if the user clicks a button on your page, and your page posts back to the server, the window.onbeforeunload event will fire. [/color]Please take this into consideration when developing the function that handles the window.onbeforeunload event. "
"Please remember that the window.onbeforeunload event is fired every time the page is about to unload. [color=red]This means that if the user clicks a button on your page, and your page posts back to the server, the window.onbeforeunload event will fire. [/color]Please take this into consideration when developing the function that handles the window.onbeforeunload event. "
本文讨论了在网页即将卸载时触发的window.onbeforeunload事件。特别指出,当用户点击页面上的按钮并提交数据到服务器时,该事件会被触发。开发者在设计处理此事件的功能时需考虑这一特性。
1万+

被折叠的 条评论
为什么被折叠?



