1
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default2.aspx.cs" Inherits="Default2" %>
2
3
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
4
5
<html xmlns="http://www.w3.org/1999/xhtml" >
6
<head runat="server">
7
<title>无标题页</title>
8
<script language="javascript">
9
10
function ClosePage()
11
{
12
if((window.screenLeft>=10000 && window.screenTop>=10000)||event.altKey)
13
{
14
window.location.href="/ClosePage.aspx"
15
}
16
}
17
18
</script>
19
</head>
20
<body onunload="ClosePage()">
21
<form id="form1" runat="server">
22
<div>
23
<asp:Button ID="Button1" runat="server" OnClick="Button1_Click" Text="Button" /></div>
24
</form>
25
</body>
26
</html>
在ClosePage.cs页面的 Page_Load销毁如下: Session.Abandon(); 
2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

注意:当刷新页面的时候也会触发onunload事件,所以需要判断是否进行关闭再执行Session的销毁操作。即:
if((window.screenLeft>=10000 && window.screenTop>=10000)||event.altKey)
{
}
0
0
使用jsonlib进行Java和JSON之间的转换
c:import Unable to get RequestDispatcher for Context
打开IE都会弹出欢迎界面“欢迎使用Internet Explorer 8”
Struts2 标签 用法示例 (
as3相关的frameworks
as相关的框架引擎应用集合
init
XNA框架基础——疑难解答
XNA框架基础——XNA的注意事项
- 最新文章
-
Beginners Guide to Getting Started with AS3 (Without Learning Flex)
actionscript
腾讯这家公司的核心竞争力是什么?为什么?
编译Tamarine
flash中制的SWC组件怎样导入到flex中使用
ExtJs4 笔记 Ext.ListView、Ext.view.View 数据视图
ExtJs4 笔记 Ext.XTemplate 模板
javascript 命名规则
ExtJs4 笔记 Ext.tip.ToolTip 提示
ExtJs4 layout 布局
- 热门文章
-
ExtJs4 笔记 ExtJs对js基本语法扩展支持
ExtJs4 笔记 Ext.Ajax 对ajax的支持
ExtJS4.x 如何在Tpl模板中添加分页控件
ExtJs4 笔记 ExtJs大比拼JQuery:Dom文档操作
ExtJs4 笔记 Ext.toolbar.Toolbar 工具栏、Ext.toolbar.Paging 分页栏、Ext.ux.statusbar.StatusBar 状态栏
使用Open Flash Chart(OFC)制作图表(Struts2处理)
jvm参数设置 vmargs Xms128M Xmx512M XX:PermSize=64M XX:MaxPermSize=128M
TestNumberFormat
struts2和spring的两种整合方式 action的自动装配
SC命令添加windows服务