在HTML中使用form相关标签
2017-09-06 13:41
281 查看
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为重置按钮类型
下图为具体例子,大家自行理解:
代码:
效果图如下:
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为重置按钮类型
下图为具体例子,大家自行理解:
代码:
效果图如下:
相关文章推荐
- Struts 中 Html 标签库 的用法(第二组标签,与Form相关的标签 )
- HTML的表单form以及form内部标签的使用
- Struts 中 Html 标签库 的用法(第二组标签,与Form相关的标签 )
- jsf xhtml form中 页面中使用 html标签
- html表格以及form表单部分标签的使用
- 只介绍 Struts 中 Html 标签库 的用法(第二组标签,与Form相关的标签 )
- 使用Struts提供的form相关的标签
- html中form标签的子标签的使用
- html相关内容以及标签的使用方法
- 介绍 Struts 中 Html 标签库 的用法(第二组标签,与Form相关的标签 )
- html语言的标签的使用
- 学习Struts提供的和Form相关的标签
- 学习Struts提供的和Form相关的标签
- 关于使用bean:write标签显示html内容
- (转)Struts -- html:link 标签的使用
- asp.net控件开发技巧(1)使用HtmlTextWriter类规范输出标签
- (转)Struts -- html:link 标签的使用
- 在struts中html:select 标签的disabled属性中使用java代码
- logic:iterate标签中使用html:link
- 使用 h:outputText 执行输出 HTML 标签