<!DOCTYPE html>
<html>
<head>
<meta name="generator"
content="HTML Tidy for HTML5 (experimental) for Windows https://github.com/w3c/tidy-html5/tree/c63cc39" />
<meta charset="utf-8" />
<title>表单</title>
</head>
<body>
<h1>会员注册</h1>
<!--action转到哪个页面-->
<form action="https://www.baidu.com/" name="form1" target="_blank">
<!--disabled不可用-->
不可用
<input type="text" value="admin" disabled="disabled" />
<br />只读:
<input type="text" value="admin" readonly="readonly" />
<br />
<!-- 文本框和密码框:value是属性默认值-->
姓名:
<input name="username" type="text" value="admin" size="20" />
<br />密码:
<input name="password" type="pswd" value="123" size="20" />
<br />
<!--文件上传-->
头像:
<input type="file" />
<br />
<input type="button" value="确定" />
<br />
<!--性别单选,name值相同-->
<!--input 值"checked"是默认选择-->
性别:
<input type="radio" name="sex" checked="checked" />男
<input type="radio" name="sex" />女
<br />语言:
<!--点击radio单选后面的文字也能选择的方法input id="id" ,label for=“id”-->
<input type="radio" id="chinese" name="language" checked="checked" />
<label for="chinese">汉语</label>
<input type="radio" id="english" name="language" />
<label for="english">英语</label>
<br />爱好:
<br />
<input type="checkbox" />篮球
<input type="checkbox" />足球
<input type="checkbox" />乒乓球
<input type="checkbox" />跳绳
<br /> <br /> <br />选择您的学历:
<!--select下的属性multiple是多选 option为disabled值时不能选-->
<select name="education" multiple="mulpitle" >
<optgroup label="学历">
<option value="master">研究生</option>
<!--默认为本科 option后面加上selected="selected"-->
<option value="university" selected="selected">本科</option>
<option value="institution">专科</option>
<option value="high-scool" disabled="disabled">高中</option></optgroup>
</select>
<br />个人说明:
<br />
<!--cols是长度,rows是高度,也就是行数-->
<textarea value="" cols="40" rows="5">
<!--双标签默认值写到两个标签之间-->...</textarea>
<br />
<input type="submit" value="确认提交" />
<input type="reset" value="重置" />
<br /></form>
</body>
</html>