嗨夥計 在我的mvc應用程序,當我運行我的應用程序時,我沒有做任何更改我的應用程序腳本的工作,並進入登錄頁面一分鐘後(測試腳本我有默認設置爲-1的sessiontimeout,這將很容易檢查腳本工作與否),現在我的問題是當我繼續工作在我的appication也重定向到登錄頁做如何修改此腳本..... ......EveryOne最小腳本被稱爲
<script type="text/javascript">
function keepAlive() {
window.clearTimeout(window.sessionKeepAlive);
window.sessionKeepAlive = window.setTimeout(function()
{
window.location.href = '<%= Url.Action("LogOn", "Account") %>';
}, <%= (Session.Timeout - 19) * 60 * 1000 %>);
} keepAlive();
</script>
是不是該問一個凌晨,而前在這裏:http://stackoverflow.com/questions/4406776/redirecting-to-another-page-not-working -in-javascript - puzled的penzance .. – 2010-12-10 13:06:46