HTMLFormControlsCollection
Baseline
Widely available
This feature is well established and works across many devices and browser versions. It’s been available across browsers since 2015年7月.
HTMLFormControlsCollection 接口表示 HTML 表单控件元素的集合,由 HTMLFormElement 接口的 elements 属性返回。
此接口替换它所基于的 HTMLCollection 中的一个方法。
实例属性
此接口从其父接口 HTMLCollection 继承属性。
实例方法
此接口从其父接口 HTMLCollection 继承方法。
HTMLFormControlsCollection.namedItem()-
返回集合中的
RadioNodeList或Element,其name或者id与指定名字匹配,如果没有节点匹配,则返回null。请注意,此版本的namedItem()隐藏从HTMLCollection继承的项。与该方法类似,使用 JavaScript 数组括号语法和字符串,如collection["value"],等价于collection.namedItem("value")。
规范
| Specification |
|---|
| HTML> # htmlformcontrolscollection> |
浏览器兼容性
Loading…