All articles(网络文学目录) All Pictures(图片目录) All Softwares(软件目录)

 
关闭按钮点击事件的捕捉_[Asp.Net教程]

Writer: delv Article type: Programming skills(编程技巧) Time: 2014/1/6 9:09:50 Browse times: 352 Comment times: 0

关闭按钮点击事件的捕捉_[Asp.Net教程]


Head photo

Go homepage
Upload pictures
Write articles

关闭按钮点击事件的捕捉_[Asp.Net教程]

<一>只需要在你的页面中加入如下的脚本即可..
function window.onbeforeunload()
{
event.returnValue = "the page will be closed, comfirm to close?";
}

<二>目的
通过捕捉点击浏览器的关闭按钮事件,可以在页面关闭前给出提示信息,提示关闭.

<三>应用的扩展
可以在后面继续添加ajax部分,去后台操作代码,可以进行清除session操作等,达到释放空间的目的.

<四>主要应用于bs结构化的应用程序

来源:网络





There are 0 records,
Comment:
Must be registered users to comment(必须是注册用户才能发表评论)

Disclaimer Privacy Policy About us Site Map
Copyright ©2011-
uuhomepage.com, Inc. All rights reserved.