如何在javascript中清除/放弃会话 [英] How to clear/abandon the session in javascript
本文介绍了如何在javascript中清除/放弃会话的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
亲爱的,
我使用以下编码来清除和放弃javascript中的会话,但它无法正常工作。在注销时点击并重定向到主页。
< br $> b $ b
如果(确认(' 你确定要退出吗?')){
killsession();
location.href = http:// xxxx / home;
}
function killsession(){
Session 。明确();
Session.Abandon();
}
解决方案
试试这个链接
使用javascript函数清除会话 [ ^ ]
希望这会有所帮助
Dear,
I have used below coding to clear and abandon the session in javascript but its not working.used in logout click and redirect to home page.
if (confirm('Are You Sure to Logout?')) {
killsession();
location.href = "http://xxxx/home";
}
function killsession() {
Session.Clear();
Session.Abandon();
}
解决方案
try this link
clear session using javascript function[^]
Hope this helps
这篇关于如何在javascript中清除/放弃会话的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文