我需要以下紧急代码 [英] I want a urgent code for the followings
本文介绍了我需要以下紧急代码的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在使用"cookies"来维护asp.net应用程序中的会话.
我想要的是,当用户登录到我的网站并闲置10分钟时,它应该自动注销并重定向到登录页面.
I am using "cookies" to maintain session in my asp.net application.
What I want is that when a user logs in to my website and remains idle for 10 minutes it should automatically log them out and redirect them to the login page.
推荐答案
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>Show alert message when user idle for sometime on webiste</title>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.js"></script>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jqueryui/1/jquery-ui.js"></script>
<script type="text/javascript" src="jquery.idle-timer.js"></script>
<script type="text/javascript">
(function(){ var timeout = 5000;
(function() { var timeout = 5000;
(document).bind("idle.idleTimer",function(){
(document).bind("idle.idleTimer", function() {
这篇关于我需要以下紧急代码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文