<script type="text/javascript">
$(function () {
//处理Session过期事件,自动注销
var hanlder;
var ResetLogoffTimer = function () {
if (hanlder) clearTimeout(hanlder);
hanlder = setTimeout(function () {
//logoff
$.ajax({ type: "POST", url: "?source=ajax", data: "&action=logoff", cache: false });
}, 1 * 60 * 1000);
};
ResetLogoffTimer();
});
</script>
if (Request.QueryString["source"]== "ajax")
{
if (Request.QueryString["action"] == "logoff")
{
lk_exit_Click(sender, e);
}
return;
}
protected void lk_exit_Click(object sender, EventArgs e)
{
//执行程序代码
}