列表标签(收集用户信息) 表单域
<form action="" method="get" name="userinfo">
<form 接收地址 提交方式 命名></form>
表单控件
<input>输入表单元素 type属性
<!-- 1、文本输入框 -->
<input type="text">
<!-- 2、按钮 -->
<input type="button">
<!-- 3、输入密码的输入框 -->
<input type="password">
<!-- 4、单选按钮 -->
<input type="radio">男
<!-- 5、复选框 -->
<input type="checkbox">艾斯
<!-- 6、提交文件按钮 -->
<input type="file">
<!-- 7、提交按钮 -->
<input type="submit">
<!-- 8、重置按钮 -->
<input type="reset">
</form>
其他属性: <form action="">
请输入密码:<input type="text" value="请输入密码"> <br>
<input type="button" value="登录">
<input type="submit" value="提交交">
<input type="radio" name="sex" checked="checked">男
<input type="radio" name="sex">女
只能输入五个字符<input type="text" maxlength="5">
</form>
<lable>标签的使用(焦点)
<form action="">
<label for="male">
<input type="radio" name="sex" id="male">男
</label>
<label for="female">
<input type="radio" name="sex" id="female">女
</label>
</form>
<select>表单元素(下拉)
<form action="">
<select>
<option>新竹</option>
<option>台北</option>
<option>高雄</option>
<option>东京</option>
<option selected="selected">重庆</option>
</select>
</form>
<textarea>表单元素(文本域:每行限制次数,多行)
<form action="">
<textarea cols="5" rows="3"></textarea>
<textarea cols="30" rows="10"></textarea>
</form>
表单标签
|