博客列表 >7-26作业-form

7-26作业-form

Brain
Brain原创
2020年08月03日 22:53:08556浏览

<!DOCTYPE html>

<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Form</title>
<style>
form {
width: 300px;
align-content: center;
}
fieldset {
width: 300px;
align-content: center;
}
input:disabled {
background-color: #fff;
border: none;
}
input:required {
background-color: rgb(250, 131, 131);
}
</style>
</head>
<body>
<form action="#" method="GET" id="form1"></form>
<fieldset>
<legend>用户注册</legend>
<div class="">
<label for="email">邮箱</label>
<input type="text" name="email" id="email" required placeholder="请输入邮箱" form="form1" />
</div>
<div class="">
<label for="passwd">密码</label>
<input type="password" name="passwd" id="passwd" required placeholder="不少于6位" form="form1" />
</div>
<div class="">
<label for="savepwd">保存密码</label>
<input type="checkbox" name="savepwd" id="savepwd" form="form1" />
</div>
<div class="">
<label for="age">生日</label>
<input type="date" name="birthday" id="" max="2020-08-02" />
</div>
<div class="">
<label for="aihao">爱好</label>
<input type="text" name="aihao" id="aihao" list="datalist1" />
<datalist id="datalist1">
<option value="php">php</option>
<option value="js">js</option>
<option value="html">html</option>
<option value="css">css</option>
</datalist>
</div>
<div class="">
<label for="gender">性别</label>
<select name="gender" id="gender">
<option value="male">男</option>
<option value="female">女</option>
<option value="other">保密</option>
</select>
</div>
<div class="">
<input type="submit" value="注册" form="form1" />
</div>
<div class="">
<label for="warning">警告</label>
<input type="text" name="" id="warning" disabled placeholder="一天内只允许登陆三次" />
</div>
</fieldset>
</body>
</html>

上一条:html基础知识下一条:7-26作业-table
声明:本文内容转载自脚本之家,由网友自发贡献,版权归原作者所有,如您发现涉嫌抄袭侵权,请联系admin@php.cn 核实处理。
全部评论
文明上网理性发言,请遵守新闻评论服务协议