<body>
<div class="bady_background"
style="background:url(images/body_background1.jpg) center 0 no-repeat ;background-size:100%;width:100%;height:100%;">
<div class="logo">
<a href="index.html" alt="主页" title="主页"></a>
</div>
<div class="container ">
<ul class="nav nav-pills" role="tablist" id="myTab">
<li class="active active_now"><a href="index.html" role="tab" data-toggle="tab"><strong>登录</strong></a></li>
<li><a class="hover_background" href="#login" role="tab" data-toggle="tab"><strong>注册</strong></a></li>
</ul>
<div class="tab-content">
<div class="tab-pane active" id="login">
<form role="form">
<div class="form-group">
<!-- <label>用户名:</label> -->
<input type="text" placeholder="你的昵称" class="form-control">
</div>
<div class="form-group">
<!-- <label>用户名:</label> -->
<input type="email" placeholder="手机号或邮箱" class="form-control" >
</div>
<div class="form-group">
<!-- <label>密码:</label> -->
<input
type="password"
placeholder="设置密码"
class="form-control"
onchange="verifyPassword(this.value)"
>
</div>
<div class="text-center">
<button class="btn btn-md btn-primary " type="submit"><strong>注册</strong>
</button>
</div>
<h6 class="text-center user_agreement">点击 “注册” 即表示您同意并愿意遵守艺格</h6>
<h6 class="text-center "><a href="#">用户协议</a> 和 <a href="#">隐私政策</a> 。</h6>
</form>
</div>
<div class="tab-pane " id="log-in">
<form role="form">
<div class="form-group">
<!-- <label>用户名:</label> -->
<input name="username" type="email" placeholder="手机号或邮箱" class="form-control"onchange="bbbbbbb(this.value )">
</div>
<div class="form-group">
<!-- <label>密码:</label> -->
<input
name="password"
type="password"
placeholder="密码"
class="form-control"
onchange="verifyPassword(this.value)"
>
</div>
<div class="save">
<input type="checkbox" class="i-checks">
<label><strong> 自动登录</strong></label></div>
<div class="text-center">
<button class="btn btn-md btn-primary" type="submit">
<strong>登录</strong>
</button>
</div>
</form>
</div>
</div>
</div>
</div>
</body>
<script>
const verifyPassword = (value) => {
if (!value.match(/^(?![^a-zA-Z]+$)(?![a-zA-Z0-9]+$).{8,}$/)) {
alert('密码必须含有数字、字母,特殊字符,长度在最少8位')
}
}
</script>
</html>
</body>
</html>