代码拉取完成,页面将自动刷新
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>找回密码</title>
<link rel="stylesheet" href="css/login.css" />
<link rel="stylesheet" href="css/ali/font_508934_kve4so1x2xs10pb9.css" />
<link rel="stylesheet" href="css/bootstrap/bootstrap.min.css" />
<script src="js/jquery.min.js"></script>
<script src="js/login.js"></script>
<script src="js/register.js"></script>
<script>
$server = 'http://localhost:8080/';
function checkUserName(){
$username = $('#ipUserName').val();
$.ajax({
url: $server + 'user/check_user_valid.do',
type: 'POST',
datatype: 'json',
data: {username: $username},
corssDomain: true,
xhrFields:{
withCredentials: true // 携带跨域cookie
},
success: function(result){
console.log(result);
if (result.code == 200){
window.location.href= encodeURI('forgetPassword.html?username='+$username);
}else{
alert(result.msg);
}
},
error: function(XMLHttpRequest, textStatus, errorThrown){
alert(textStatus);
}
});
}
</script>
</head>
<body>
<div class="top">
<div class="top_logo">
<img src="img/login_logo.jpg" />
</div>
<div class="top_line"></div>
</div>
<div class="main0">
<div class="main">
<div class="input-group" style="width: 300px; margin: 0 auto;">
<span class="input-group-addon">用户名</span>
<input id="ipUserName" type="text" class="form-control"/>
<span class="input-group-btn">
<button class="btn btn-default" type="button" onclick="checkUserName()">校验</button>
</span>
</div>
</div>
</div>
<div class="footer">Copyright © 2019 Bowen University . 桂ICP备888888888号</div>
</body>
</html>
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。