1、<input type="text"/> type为文本类型
2、<input type="password"/> type为密码类型
3、<input type="button"/> type为普通按钮类型
4、<input type="radio" name=" "/> type为单选按钮类型,checked为选中当前按钮,name名称需保证一致,如(<input type="radio" value="男" name="sex" checked="" />男<input type="radio" value="女" name="sex" />女)
5、<input type="checkbox"/> type为复选按钮类型
6、<select>
<option>1</option>
<option>2</option>
<option>3</option>
</select>
select为下拉列表
7、<textarea cols="50" rows="6"></textarea>
textarea为文本域,cols和rows设置文本域宽高,可以输入多行内容
8、<img src="a.jpg" width="150" height="160"/>img为图片显示
9、<input type="file" /> type为文件类型,我们可以选择想要上传的文件进行上传
10、<input type="submit" value="提交按钮" />type为提交按钮类型
11、<input type="reset" value="重置按钮" disabled="true" />type为重置按钮类型
下图为具体例子,大家自行理解:
代码:
效果图如下: