笙默考试管理系统-后台登录页面展示(3)
<div class="footer">笙默考试管理系统</div>
</body>
<script src="~/Scripts/jquery-1.8.2.js"></script>
<script type="text/javascript" src="~/Content/CSS/lib/jquery/1.9.1/jquery.min.js"></script>
<script type="text/javascript" src="~/Content/CSS/static/h-ui/js/H-ui.min.js"></script>
<script type="text/javascript">
$(function () {
$("#verifyimg").click(function () {
CreateByCodeImg();
})
function CreateByCodeImg() {
var url = "@Url.Action("CreateCode", "Index")?rums=" + Math.random();
$("#verifyimg").attr("src", url);
}
})
</script>
<script src="~/Scripts/layer/layer.js"></script>
<script type="text/javascript">
$(function () {
$("[name=myform]").submit(function () {
var loginId = $("[name=UserName]").val();
var loginPwd = $("[name=passWord]").val();
var verifyCode = $("[name=VerifyCode]").val();
var cookies = $("[name=Cookies]").val();
$.post("@Url.Action("Login", "Index")", { loginId: loginId, loginPwd: loginPwd, verifyCode: verifyCode, cookies: cookies }, function (data) {
if (data == "true") {
layer.alert('登录成功中', { icon: 6 });
//加载层-风格3
layer.load(2);
setTimeout(function () {
layer.closeAll('loading');
location.href = "@Url.Action("Index","Index")";
}, 2000);
} else {
layer.msg('登陆失败,您的访问权限不足!', { icon: 5 });
}
})
return false;
});
})
</script>