需求1:创建一个个人信息注册的表单界面,包含用户名,密码,确认密码,性别(单选)
,兴趣爱好(多选),国籍(下拉列表),隐藏域,自我评价(多行文本域),重置,提交
form标签就是表单
input type=text 是文件输入框 value设置默认显示内容
input type=password 是密码输入框 value设置默认显示内容
input type=radio 是单选框 name属性可以对其进行分组 checked="check"表示默认选中
input type=checkbox 是复选框 checked="checked"表示默认选中
input type=reset 是重置按钮 value属性修改按钮上的文本
input type=submit 是提交按钮 value属性修改按钮上的文本
input type=button 是按钮 value属性修改按钮上的文本
input type=file 是文件上传域
input type=hidden 是隐藏域 当我们要发送某些信息,而这些信息,不需要用户参与,就可以使用隐藏域(提交的时候同时发送给服务器)
select 标签是下拉列表框
option 标签是下拉列表框中的选项 selected="selected"设置默认选中
textarea 表示多行文本输入框 (起始标签和结束标签中的内容是默认值)
rows 属性设置可以显示几行的高度
cols 属性设置每行可以显示几个字符宽度
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>表单的显示</title>
</head>
<body>
<!--
需求1:创建一个个人信息注册的表单界面,包含用户名,密码,确认密码,性别(单选)
,兴趣爱好(多选),国籍(下拉列表),隐藏域,自我评价(多行文本域),重置,提交
-->
<!--
form标签就是表单
input type=text 是文件输入框 value设置默认显示内容
input type=password 是密码输入框 value设置默认显示内容
input type=radio 是单选框 name属性可以对其进行分组 checked="check"表示默认选中
input type=checkbox 是复选框 checked="checked"表示默认选中
input type=reset 是重置按钮 value属性修改按钮上的文本
input type=submit 是提交按钮 value属性修改按钮上的文本
input type=button 是按钮 value属性修改按钮上的文本
input type=file 是文件上传域
input type=hidden 是隐藏域 当我们要发送某些信息,而这些信息,不需要用户参与,就可以使用隐藏域(提交的时候同时发送给服务器)
select 标签是下拉列表框
option 标签是下拉列表框中的选项 selected="selected"设置默认选中
textarea 表示多行文本输入框 (起始标签和结束标签中的内容是默认值)
rows 属性设置可以显示几行的高度
cols 属性设置每行可以显示几个字符宽度
-->
个人信息注册表</br>
<form>
用户名称:<input type="text" value="默认值"/><br/>
用户密码:<input type="password" value="123"/><br/>
确认密码:<input type="password" value="123"/><br/>
性别:<input type="radio" name="sex"/>男<input type="radio" name="sex" checked="checked"/>女<br/>
兴趣爱好:<input type="checkbox" checked="checked"/>Java<input type="checkbox"/>JavaScript<input type="checkbox"/>C++<br/>
国籍:<select>
<option>--请选择国籍--</option>
<option>中国</option>
<option>美国</option>
<option>日本</option>
</select><br/>
自我评价:<textarea rows="10" cols="20">我才是默认值</textarea><br/>
<input type="reset" />
<input type="submit" />
<input type="button"/>
<input type="file"/>
<input type="hidden" name="abc" value="abcValue"/>
</form>
</body>
</html>