HTMLFieldSetElement - Web API 接口参考 编辑
HTML Field Set Element
DOM fieldset
elements expose the HTMLFieldSetElement (HTML 4 HTMLFieldSetElement) interface, which provides special properties and methods (beyond the regular element object interface they also have available to them by inheritance) for manipulating the layout and presentation of field-set elements.
属性
以下属性除了 form 都是在 HTML5 中新添加的.
名称 | 类型 | 描述 |
---|---|---|
disabled | Boolean | 读取HTML属性 disabled ,表明用户是否可以操作该控件. |
elements | readonly HTMLFormControlsCollection | The elements belonging to this field set. |
form | readonly HTMLFormElement | The containing form element, if this element is in a form. Otherwise, the element the name content attribute points to HTML5. (null in HTML 4.) |
name | DOMString | Reflects the name HTML attribute, containing the name of the field set, used for submitting the form. |
type | readonly DOMString | 一定为字符串fieldset . |
validationMessage | readonly DOMString | A localized message that describes the validation constraints that the element does not satisfy (if any). This is the empty string if the element is not a candidate for constraint validation (willValidate is false), or it satisfies its constraints. |
validity | readonly ValidityState | The validity states that this element is in. |
willValidate | boolean | Always false because fieldset objects are never candidates for constraint validation. |
方法
名称 & 参数 | 返回值 | 描述 |
---|---|---|
checkValidity () | Boolean | 如果元素的值没有有效性问题,则返回true ,否则返回false 并触发invalid 事件. |
setCustomValidity(in DOMStringerror) | void | 设置一个自定义错误,则该元素将无法通过有效性验证.参数指定的字符串就是在向用户报告错误时显示的消息.如果为空字符串,则清除这个自定义错误. |
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论