我想在用户直接关闭IE时,触发一个事件,请问时Global.asax 中的哪个事件????
是这个吗???
protected void Application_End(Object sender, EventArgs e)
{}
请知道的大侠指教一下!!!!谢谢!
是这个吗???
protected void Application_End(Object sender, EventArgs e)
{}
请知道的大侠指教一下!!!!谢谢!
调试欢乐多
window.onunload = function()
{
//连接到一个页面,这个页面是清楚session
window.location.href="../Validate/Logout.aspx";
}
</script>
onunload 事件在IE关闭时执行,
但我的项目中有画面的迁移,只要迁移到另一个画面,就会触发这个事件,我的目的是用户直接关闭了ie触发这个事件,请问各位大哥大姐怎么办???帮小弟想想办法
路过的帮忙顶一下吧!!!谢谢!!!!
{
if(document.body.clientWidth-event.clientX< 170&&event.clientY< 0||event.altKey)
{
window.location.href="../Validate/Logout.aspx";
}
} 小弟搞定了,这个代码只是在关闭浏览器和刷新浏览器时触发的事件!!!
谢谢各位大哥!