@fengfeng
2014-09-19T10:05:42.000000Z
字数 745
阅读 1187
form
- when the checked state of an input:checkbox or input:radio element is modified, the CHECKED property is changed
- when the contents of an input:text or textarea element are modified, the value property is changed
- when the selection in a select element is modified, the selectedIndex property is changed.
submit 触发
input type="submit"
input type="image"
button type 不等于button时
默认点击就提交表单
- form.id(如果id为submit,则报错Uncaught TypeError: object is not a function)当元素id也是submit时,form.id取到的是这个元素;
或
- form 里面的id.submit/id.function() 报错,因为IE里id直接取到这个表单元素。
- 当dom的id和表单的name属性相同时,getElementById会匹配到同名的form。When using getElementById to get a reference to an element via the id attribute, Internet Explorer for Windows (and some versions of Opera) will also match an element whose name attribute contains the same value.