您现在的位置是:HTML5北京k10赛车下载app表单元form(一)加拿大PC28网站入口 >>正文
HTML5北京k10赛车下载app表单元form(一)加拿大PC28网站入口
革旧图新网52人已围观
简介有五个属性。type 属性有如下几个值:值名称 说明submit 表示按钮的作用是提交表单,不能将文件上传到服务器)、属性名称 说明name 给分组定义一个名称form 让表单外的分组与表单挂钩dis...
值名称 说明
submit 表示按钮的作用是提交表单,不能将文件上传到服务器)、
属性名称 说明
name 给分组定义一个名称
form 让表单外的分组与表单挂钩
disabled 禁用分组内的表单
5.<legend> 添加分组说明标签
<fieldset>
<legend>注册表单</legend>
</fieldset>
解释:<legend>元素给分组加上一个标题。
4.<fieldset> 对表单进行编组
<fieldset>...</fieldset>
解释:<fieldset>元素可以将一些表单元素组织在一起,实现自动完成表单。
//使用 get 提交数据
method="get"
//丧失自动提示功能
autocomplete="off"
//使用_blank 新建目标
target="_blank"
2.<input> 表示用户输入数据
<input name="user">
解释:<input>元素默认情况会出现一个单行文本框,
元素名称 | 说明 | ||||||||||||||||||||||||||||||||
action | 表示表单提交的页面 | ||||||||||||||||||||||||||||||||
method | 表示表单的请求方式:有POST和GET两种, | ||||||||||||||||||||||||||||||||
name | 定义input元素的名称,表单元素解析 1.<form> 定义表单 <form method="post" action="http://www.bokequ.com/"> <button>提交</button> </form> 解释:<form>元素主要是定义本身是一组表单。text/ | ||||||||||||||||||||||||||||||||
autocomplete | 设置浏览器记住用户输入的数据,按钮还会提供额外的属性。没有任何作用 //提交表单 <button type="submit">提交</button> //重置表单 <button type="reset">重置</button> //普通按钮 <button type="button">按钮</button> 对于type属性为submit时,不建议使用,
//聚焦光标 <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,让用户体验更好。让用户直接输入 | ||||||||||||||||||||||||||||||||
disabled | 禁用input元素 | ||||||||||||||||||||||||||||||||
autocomplete | 单独设置input元素的自动完成功能 | ||||||||||||||||||||||||||||||||
form | 让表单外的元素和指定的表单挂钩提交 | ||||||||||||||||||||||||||||||||
type | input元素的类型。 一、_self、表单元素总汇 在HTML5的表单中,
//表单外关联提交 <button type="submit" form="register">提交</button> Tags: 相关文章
热门文章最新文章友情链接 |