62,046
社区成员
发帖
与我相关
我的任务
分享
private void Form1_Load(object sender, EventArgs e)
{
string Url = Application.StartupPath.Substring(0, Application.StartupPath.LastIndexOf("\\"));
Url = Url.Substring(0, Url.LastIndexOf("\\")) + "\\Login.html";
this.webBrowser1.Url = new Uri(Url);
}
<script type="text/javascript">
function Login() {
var Name = $("#Name").val();
if (Name=="") {
layer.msg('请输入账号!');
return;
}
var Pwd = $("#Pwd").val();
if (Pwd == "") {
layer.msg('请输入密码!');
return;
}
$.ajax({
type: 'get',
url: 'Handler/Logins',
dataType: 'json',
data: { Name: Name, Pwd: Pwd},
success: function (data) {
if (data.type == 1) {
window.location.href = "Index.html";
} else {
layer.msg(data.message);
}
},
error: function (xhr, type) {
layer.msg("请求错误,请稍后在试!");
}
});
}
</script>
<body class="loginBg">
<div class="login">
<img class="baiselogo" src="img/baiselogo.png">
<div class="loginItem flex flexAIC">
<img src="img/zh.png">
<input id="Name" class="flexf" type="text" placeholder="请输入账号" />
</div>
<div class="loginItem flex flexAIC">
<img src="img/mm.png">
<input id="Pwd" class="flexf" type="password" placeholder="请输入密码" />
</div>
<div onclick="Login()" class="loginBtn flex flexAIC flexJSB">
进入<img src="img/jinru.png">
</div>
</div>
</body>