<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Document</title>
<style>
button {
background-color: brown;
color: aqua;
}
button:hover {
color: yellow;
}
legend {
color: rgb(170, 19, 19);
font-size: 20px;
text-align: center;
}
</style>
</head>
<body>
<form action="" id="register">
<section>
<label for="userpic">头像</label>
<input type="file" name="user_pic" id="userpic" />
</section>
<section>
<input type="hidden" name="MAX_FILE_SIZE" value="38008" />
</section>
<section>
<label for="course">课程</label>
<input type="text" name="course" list="courses" />
<datalist id="courses">
<option value="html/css开发与实践"></option>
<option value="js开发与实践"></option>
<option value="php开发与实践"></option>
<option value="larave开发与实践"></option>
</datalist>
</section>
<section>
<input type="image" name="submit" src="play.jpg" width="100" />
</section>
</form>
<hr />
<fieldset>
<legend>选填信息</legend>
<section>
<label for="email">邮箱:</label>
<input type="email" name="email" id="email" form="register" />
</section>
<section>
<label for="age">年龄:</label>
<input
type="nubmer"
name="age"
id="age"
min="18"
max="50"
step="2"
form="register"
/>
</section>
</fieldset>
<button formaction="login.php" formmethod="POST" formtarget="blank">
登录
</button>
<button formaction="register.php" formmethod="get" formtarget="self">
注册
</button>
<hr />
<form action="">
<select
name="course"
id="course"
size="4"
multiple
onchange="alert(this.value)"
onclick="alert(k考虑好了吗?)"
>
<optgroup label="前端">
<option value="html">html</option>
<option value="css">css</option>
<option value="js" selected>js</option>
</optgroup>
<optgroup label="后端">
<option value="php">php</option>
<option value="larave">larave</option>
<option value=""></option>
</optgroup>
</select>
留言板:<textarea
name="replay"
cols="30"
rows="10"
minlength="25"
maxlength="50"
placeholder="请留言"
>
</textarea>
<button type="submit">提交</button>
</form>
</body>
</html>