JSP作业2-利⽤html实现简单的⽤户登录注册界⾯实验要求:
⾃⼰拟定⼀个Web应⽤系统,设计其启动页⾯和⽤户登录注册页⾯。
具体要求:
设计系统启动页⾯,使⽤CSS完成页⾯中的格式化设计简单格式化即可。
⽤户登录页⾯
页⾯中⾄少包括⽤户登录表单,有⽤户注册的链接⽅式。
登录表单的提交可以暂时空缺
⽤户注册页⾯
页⾯中⾄少包括⽤户注册表单,有⽤户登录的链接⽅式。
注册表单的提交可以暂时空缺
代码index.html
<meta http-equiv="X-UA-Compatible"content="IE=edge">
<meta name="viewport"content="width=device-width, initial-scale=1">
<title>jsp作业</title>
<link href="css/bootstrap.min.css"rel="stylesheet">
</head>
<body>
<nav class="navbar navbar-default">
<div class="container-fluid">
<div class="navbar-header">
<a class="navbar-brand"href="./">jsp作业</a>
</div>
<div class="collapse navbar-collapse"id="bs-example-navbar-collapse-1">
<ul class="nav navbar-nav navbar-right">
<li><a href="login.html">登录</a></li>
</ul>
</div>
</div>
</nav>
<div class="container">
<div class="jumbotron">
<h1>Hello, world!</h1>
<p>这是⼀个jsp作业</p>
</div>
</div>
</body>
</html>
login.html
<meta http-equiv="X-UA-Compatible"content="IE=edge">
<meta name="viewport"content="width=device-width, initial-scale=1">
<title>登录</title>
<link href="css/bootstrap.min.css"rel="stylesheet">
</head>
<body>
<nav class="navbar navbar-default">
<div class="container-fluid">
<div class="navbar-header">
<a class="navbar-brand"href="./">jsp作业</a>
</div>
<div class="collapse navbar-collapse"id="bs-example-navbar-collapse-1">
<ul class="nav navbar-nav navbar-right">
<li><a href="login.html">登录</a></li>
</ul>
</div>
</div>
</nav>
<div class="container">
<div class="row">
<div class="col-md-4">
</div>
<div class="col-md-4">
<form class="form-signin"target="submitFrame"method="post">
<h2class="form-signin-heading">登录到jsp作业</h2>
<label for="inputEmail">Email</label>
<input type="email"id="inputEmail"class="form-control"placeholder="请输⼊Email"required autofocus><br>
<label for="inputPassword">密码</label>
<input type="password"id="inputPassword"class="form-control"placeholder="请输⼊密码"required>
<div class="checkbox">
<label>
<input type="checkbox"value="remember-me"checked="checked">记住密码
</label>
</div>
<button type="submit"class="btn btn-primary"id="btn-login">登录</button>
<a href="reg.html"class="btn btn-default">注册</a>
</form>
<iframe name="submitFrame"src="about:blank"></iframe>
</div>
<div class="col-md-4">
</div>
</div>
<script src="js/jquery.min.js"></script>
</body>
</html>
注册页⾯reg.html
<meta http-equiv="X-UA-Compatible"content="IE=edge">
<meta name="viewport"content="width=device-width, initial-scale=1">
<title>注册</title>
<link href="css/bootstrap.min.css"rel="stylesheet">
</head>
<body>
<nav class="navbar navbar-default">
<div class="container-fluid">
<div class="navbar-header">
<a class="navbar-brand"href="./">jsp作业</a>
</div>
<div class="collapse navbar-collapse"id="bs-example-navbar-collapse-1">
<ul class="nav navbar-nav navbar-right">
<li><a href="login.html">登录</a></li>
</ul>
</div>
</div>
</nav>
<div class="container">
<div class="row">
<div class="col-md-4">
</div>
<div class="col-md-4">
<form class="form-signin"target="submitFrame"method="post">
<h2class="form-signin-heading">注册到jsp作业</h2>
<div id="info">
</div>
jsp和html哪个更好<label for="inputEmail">Email</label>
<input type="email"id="inputEmail"class="form-control"placeholder="请输⼊Email"required autofocus><br>
<label for="inputPassword">密码</label>
<input type="password"id="inputPassword"class="form-control"placeholder="请输⼊密码"required maxLength="16"><br>
<label for="inputPassword">重复密码</label>
<input type="password"id="inputPassword2"class="form-control"placeholder="请再次输⼊密码"required maxLength="16"><br>
<button type="submit"class="btn btn-primary"id="btn-reg">注册</button>
<a href="login.html"class="btn btn-default"id="btn-reg">返回登录</a>
</form>
<iframe name="submitFrame"src="about:blank"></iframe>
</div>
<div class="col-md-4">
</div>
</div>
<script src="js/jquery.min.js"></script>
</body>
</html>
css使⽤bootstrap.min.css
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系QQ:729038198,我们将在24小时内删除。
发表评论