if keycode=13  then ...

解决方案 »

  1.   

    用.net在global.asax里设置一下就可以了吧,不需要很麻烦的。
    <script Language="VB" runat="server">
    Sub Application_Start(S As Object, E As EventArgs)End SubSub Session_Start(S As Object, E As EventArgs)End SubSub Session_End(S As Object, E As EventArgs)End SubSub Application_End(S As Object, E As EventArgs)
      '当应用程序结束时要执行的代码
    End Sub</script>
    详细的细节参看VS中的帮助
      

  2.   

    Page_unload()里执行或等自然超时也行
      

  3.   

    退出系统的时候令session("x")=null
      

  4.   

    在页面的onunload时打开一个页面:
    <body language="javascript" onunload="window.open('sessionAbandon .aspx',null,'height=100,width=100')">在打开的页面中将Session都清除,然后关闭窗口