如何使用javascript实现注销功能 [英] how to implement logout functionality using javascript

查看:184
本文介绍了如何使用javascript实现注销功能的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何使用javascript / jquery实现注销功能







请分享您的解决方案信息

how to implement logout functionality using javascript/jquery



Please share your solution information

推荐答案

Quote:

是的,你需要创建一个控制器动作,如果如果您正在使用WebForms,那么您正在使用MVC或通用处理程序。此处理程序/操作需要调用FormsAuthentication.SignOut方法。在jQuery中,你需要对这个动作/处理程序进行ajax调用。

Yes, you will need to create a controller action, if you're using MVC or a generic handler if you're using WebForms. This handler/action will need to call the FormsAuthentication.SignOut method. In jQuery you will need to make an ajax call to this action/handler.








.post(' / url / of / signout / action',null,function (数据){
// 处理成功注销
});
.post('/url/of/signout/action', null, function(data) { //handle successful logout });





欲了解更多信息:



如何使用表单身份验证使用jquery或javascript注销? [ ^ ]



我希望这会对你有所帮助。







添加链接文字以反映文章标题。

[/编辑]


这篇关于如何使用javascript实现注销功能的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆