<!DOCTYPE html>
<!-- saved from url=(0038)http://v3.bootcss.com/examples/signin/ -->
<html lang="zh-CN">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- 上述3个meta标签*必须*放在最前面,任何其他内容都*必须*跟随其后! -->
<meta name="description" content="">
<meta name="author" content="">
<link rel="icon" href="http://v3.bootcss.com/favicon.ico">
<title>登录页面</title>
<!-- Bootstrap core CSS -->
<link href="./Signin_files/bootstrap.min.css" rel="stylesheet">
<!-- IE10 viewport hack for Surface/desktop Windows 8 bug -->
<link href="./Signin_files/ie10-viewport-bug-workaround.css" rel="stylesheet">
<!-- Custom styles for this template -->
<link href="./Signin_files/signin.css" rel="stylesheet">
<!-- Just for debugging purposes. Don't actually copy these 2 lines! -->
<!--[if lt IE 9]>
<script src="../../assets/js/ie8-responsive-file-warning.js"></script><![endif]-->
<script src="./Signin_files/ie-emulation-modes-warning.js."></script>
<!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
<!--[if lt IE 9]>
<script src="https://cdn.bootcss.com/html5shiv/3.7.3/html5shiv.min.js"></script>
<script src="https://cdn.bootcss.com/respond.js/1.4.2/respond.min.js"></script>
<![endif]-->
<style>
.form-signin-heading {
text-align: center;
}
.email-input {
margin-bottom: 15px !important;
}
.email-input, .password-input {
border-radius: 3px !important;
}
</style>
<script src="jquery-3.2.1.min.js"></script>
<script>
$(function () {
$('[type="submit"]').click(function () {
$('.comment-input').each(function () {
//如果第一个为空,则return false 终止循环
if ($(this).val().length === 0) {
$(this).parent().addClass('has-error');
$(this).next().removeClass('hide');
return false
} else {
$(this).parent().removeClass('has-error');
$(this).next().addClass('hide');
}
});
return false
});
})
</script>
</head>
<body>
<div class="container">
<form class="form-signin" novalidate>
<h2 class="form-signin-heading">请登录</h2>
<div class="form-group">
<label for="inputEmail" class="sr-only">邮箱</label>
<input type="email" id="inputEmail" class="form-control email-input comment-input" placeholder="请输入邮箱地址"
autofocus="">
<span id="emailHelpBlock" class="help-block hide">请输入正确的邮箱地址</span>
</div>
<div class="form-group">
<label for="inputPassword" class="sr-only">密码</label>
<input type="password" id="inputPassword" class="form-control password-input comment-input"
placeholder="请输入登录密码">
<span id="pwdHelpBlock" class="help-block hide">请输入6-12位密码</span>
</div>
<div class="checkbox">
<label>
<input type="checkbox" value="remember-me">记住密码
</label>
</div>
<button class="btn btn-lg btn-primary btn-block" type="submit">登录</button>
</form>
</div> <!-- /container -->
<!-- IE10 viewport hack for Surface/desktop Windows 8 bug -->
<script src="./Signin_files/ie10-viewport-bug-workaround.js."></script>
</body>
</html>
html之页面登录
最新推荐文章于 2023-04-05 21:25:41 发布