[html5]记一些html5的东西
2016-03-16 11:56
453 查看
1级标题代表标签
2级标题代表属性
The form element that the input element is associated with (its form owner). The value of the attribute must be an id of a element in the same document. If this attribute is not specified, this element must be a descendant of a element. This attribute enables you to place elements anywhere within a document, not just as descendants of their form elements.
一般input标签都是放在form标签里面去提交的,但现在,允许将input标签放在任何地方,只要给input设置form属性,值为form标签的id值。
例如这样:
这样点击submit按钮后,就会自动带上 id=001 这个参数了
2级标题代表属性
input
form
这里是MDN上面的解释The form element that the input element is associated with (its form owner). The value of the attribute must be an id of a element in the same document. If this attribute is not specified, this element must be a descendant of a element. This attribute enables you to place elements anywhere within a document, not just as descendants of their form elements.
一般input标签都是放在form标签里面去提交的,但现在,允许将input标签放在任何地方,只要给input设置form属性,值为form标签的id值。
例如这样:
<form id="form" action="/"> <button>submit</button> </form> <input form="form" type="hidden" name="id" value="001">
这样点击submit按钮后,就会自动带上 id=001 这个参数了
相关文章推荐
- h5
- HTML5骨骼动画Demo
- HTML5进阶(三)HBuilder实现软件自动升级(优化篇)
- HTML5进阶(三)HBuilder实现软件自动升级(优化篇)
- H5实现屏幕手势解锁
- 用HTML5的Audio标签做一个歌词同步的效果
- 利用 mui+html5plus+native.js开发
- HTML5 表单验证
- 语义化标签,和类名说再见
- html5和css篇有关浮动以及如何清除浮动
- html5 视频播放
- HTML5 1.11 figure/figcaptio
- HTML5 1.10 微格式
- html5 IndexedDB
- 系列文章--突袭HTML5
- 2013年五大主流浏览器 HTML5 和 CSS3 兼容性大比拼【转】
- Modernizr——为HTML5和CSS3而生!
- 【html5和css3】animation属性整理
- HTML5本地存储
- HTML5 是什么