Form表单设计
程序员文章站
2023-12-21 15:58:46
...
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Form</title>
</head>
<body>
<p></p>
<p></p>
<center>
<form action="http://www.baidu.com" method="get">
<fieldset>
<legend>必填内容</legend>
姓名:<input type="text" name="username" value="请输入用户名" size="20" /><br />
密码 : <input type="password" name="password" /><br />
</fieldset>
隐藏框:<input type="hidden" /><br />
<fieldset>
<legend> 选填内容</legend>
性别:<input type="radio" name="sex" checked/>男
<input type="radio" name="sex" />女<br />
爱好:<input type="checkbox" name="like" value="eat" />吃饭
<input type="checkbox" name="like" value="sleep" />睡觉
<input type="checkbox" name="like" value="play" />打豆豆
<p></p>
学历:<select name="xueli">
<option value="collage">大学</option>
<option value="highschool">高中</option>
<option value="middleschool">初中</option>
</select>
<p></p>
备注:<textarea rows="1" cols="20" >留言</textarea><p></p>
<input type="button" value="普通按钮" onclick="alert(this.value)"/>
<input type="submit" value="提交按钮" />
<input type="reset" value="重置按钮" />
<input type="image" src="https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1551672779997&di=4b1631a632097eaef41f1cf37c2ac478&imgtype=0&src=http%3A%2F%2Fpic29.photophoto.cn%2F20131201%2F0007020131589744_b.jpg" width="100" height="30" />
</fieldset>
</form>
</center>
</body>
</html>