HTML5征途国际ap幸运赛车投注p表单元form(一)
reset 表示按钮的作用是重置表单
button 表示按钮为一般性按钮,没有任何作用
//提交表单
<button type="submit">提交</button>
//重置表单
<button type="reset">重置</button>
//普通按钮
<button type="button">按钮</button>
对于type属性为submit时,提供了各种可供用户输入的表单控件。且更加容易设置 CSS 样式。text/plain(未规范的编码,以便程序调用
4.<fieldset> 对表单进行编组
<fieldset>...</fieldset>
解释:<fieldset>元素可以将一些表单元素组织在一起,实现自动完成表单。type 属性有如下几个值:
值名称 说明
submit 表示按钮的作用是提交表单,有三种:application/x-www-form-urlencoded(默认编码,如果不想自动完成则设置of幸运赛车投注f。征途国际app_self、不建议使用,
元素名称 | 说明 | ||||||||||||||||||||||||
autofocus | 让光标聚焦在某个input元素上,
二、 | ||||||||||||||||||||||||
name | 定义input元素的名称,不能将文件上传到服务器)、默认GET | ||||||||||||||||||||||||
enctype | 表示浏览器对发送给服务器的数据所采用的编码格式。
//使用 get 提交数据 method="get" //丧失自动提示功能 autocomplete="off" //使用_blank 新建目标 target="_blank" 2.<input> 表示用户输入数据 <input name="user"> 解释:<input>元素默认情况会出现一个单行文本框,
5.<legend> 添加分组说明标签 <fieldset> <legend>注册表单</legend> </fieldset> 解释:<legend>元素给分组加上一个标题。默认为on自动完成,_parent、以便接收到相应的值 |
//聚焦光标
<input name="user" autofocus>
//禁用 input
<input name="user" disabled>
//禁止自动完成
<input name="user" autocomplete="off">
//表单外的 input
<form method="get" id="register">
...
</form>
<input name="email" form="register">
3.<label> 添加说明标签
<p>label for="user">用户名:input id="user" name="user"></label></p>
解释:<label>元素可以关联 input,有五个属性。让用户直接输入
在HTML5的表单中,
属性名称 | 说明 |
form | 指定按钮关联的表单 |
formaction | 覆盖form元素的action属性 |
formenctype | 覆盖form元素的enctype属性 |
formmethod | 覆盖form元素的method属性 |
formtarget | 覆盖form元素的target属性 |
formnovalidate | 覆盖form元素的novalidate属性 |
//表单外关联提交
<button type="submit" form="register">提交</button>
形成一个整体。6.<button> 添加按钮
<button type="submit"></button>
解释:<button>元素添加一个按钮,
1.<form> 定义表单
<form method="post" action="http://www.bokequ.com/">
<button>提交</button> </form>
解释:<form>元素主要是定义本身是一组表单。
本文地址:http://263wh.xny028cc.com/beer/5.html
版权声明
本文仅代表作者观点,不代表本站立场。
本文系作者授权发表,未经许可,不得转载。