标签:
//前端脚本
function LoginOut() { if (window.confirm("是否退出?")) { window.location.href = "/Account/loginOut"; } }
<script>
<a onclick="LoginOut()">退出</a>
</script>
后台程序
public ActionResult LoginOut() { FormsAuthentication.SignOut(); return RedirectToAction("Acount", "Login"); }
标签:
原文地址:http://www.cnblogs.com/sandyliu1999/p/4981436.html