这里我们所说的数据元素其实就是表单样式,它的作用就是完成输入,选择等一系列操作,具体如下:
(1)文本框<input type="text" placeholder="请输入用户名">(placeholder的功能就是在没有输入之前默认显示)
(2)密码框<input type="password">
(3)多选框
<inputtype="checkbox" checked="true">唱歌
<inputtype="checkbox">跳舞
<inputtype="checkbox">舞蹈
(4)单选框(name名称相同就可以了)
<!--单选框 -->
<!--name 名字相同是注释 -->
<inputtype="radio" name="sex">男
<inputtype="radio" name="sex">女
(5)下拉列表(selected 默认选中)
<select>
<optionvalue="">请选择</option>
<optionvalue="" selected="true">北京</option>
<optionvalue="">上海</option>
<optionvalue="">广州</option>
</select>
(6)多行列表
<textareaname=""></textarea>
(7)按钮
<inputtype="button" name="" value="搜索"placeholder="">
<buttonvalue="按钮"></button>
(8)隐藏域
<input type="hidden"name="" value="">