<html>
<head>
<title>欢迎使用登录界面</title>
<style>
* {margin: 0; padding: 0 }
.absoluteCenter {
/*width: 700px;
height: 800px;*/
background-color: rgb(108, 110, 247);
position: absolute;
left: 50%;
top: 50%;
margin-left: -300px;
margin-top: -400px;
}
form{
font-size: 20px;
color: #8f2626;
}
</style>
</head>
<body >
<script type="text/javascript">
function check(form) {
if(form.username.value=='') {
alert("请输入用户帐号!");
form.username.focus();
return false;
}
if(form.password.value==''){
alert("请输入登录密码!");
form.password.focus();
return false;
}
return true;
}
</script>
<form method="POST" class="absoluteCenter">
<h1>登录界面</h1>
账户:<input type="text" name="username" value=""/>*<br/>
密码:<input type="password" name="password" value=""/>*<br/>
性别:<input type="radio" name="gender" checked="checked"/>男
<input type="radio" name="gender"/>女<br/>
爱好:<input type="checkbox"/>篮球
<input type="checkbox"/>篮球
<input type="checkbox"/>篮球<br/>
居住地:<select>
<option>宁夏1</option>
<option>宁夏2</option>
<option>宁夏3</option>
<option selected="selected">宁夏4</option>
<option>宁夏5</option>
</select><br><br>
<input type="submit" name="submit1" value="登录" onclick="check(this.form)"/>
<input type="reset" value="重置"/>
</form>
</body>
</html>