From 33058f2b292b3a581333bdfb21b8f671898c5060 Mon Sep 17 00:00:00 2001 From: Peter Bengtsson Date: Tue, 8 Dec 2020 14:40:17 -0500 Subject: initial commit --- files/zh-cn/web/api/htmlfieldsetelement/index.html | 84 ++++++++++++++++++++++ 1 file changed, 84 insertions(+) create mode 100644 files/zh-cn/web/api/htmlfieldsetelement/index.html (limited to 'files/zh-cn/web/api/htmlfieldsetelement') diff --git a/files/zh-cn/web/api/htmlfieldsetelement/index.html b/files/zh-cn/web/api/htmlfieldsetelement/index.html new file mode 100644 index 0000000000..51b93938c5 --- /dev/null +++ b/files/zh-cn/web/api/htmlfieldsetelement/index.html @@ -0,0 +1,84 @@ +--- +title: HTMLFieldSetElement +slug: Web/API/HTMLFieldSetElement +translation_of: Web/API/HTMLFieldSetElement +--- +

{{ ApiRef() }}

+

HTML Field Set Element

+

DOM fieldset elements expose the HTMLFieldSetElement  ({{ HTMLVersionInline(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 都是在 {{ HTMLVersionInline(5) }} 中新添加的.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
名称类型描述
disabledBoolean读取HTML属性 {{ htmlattrxref("disabled", "fieldset") }},表明用户是否可以操作该控件.
elementsreadonly HTMLFormControlsCollectionThe elements belonging to this field set.
formreadonly HTMLFormElementThe containing form element, if this element is in a form. Otherwise, the element the name content attribute points to {{ HTMLVersionInline(5) }}. (null in {{ HTMLVersionInline(4) }}.)
nameDOMStringReflects the {{ htmlattrxref("name", "fieldset") }} HTML attribute, containing the name of the field set, used for submitting the form.
typereadonly DOMString一定为字符串fieldset.
validationMessagereadonly DOMStringA 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.
validityreadonly ValidityStateThe validity states that this element is in.
willValidatebooleanAlways false because fieldset objects are never candidates for constraint validation.
+

方法

+ + + + + + + + + + + + + + + + + + + + +
名称 & 参数返回值描述
checkValidity()Boolean如果元素的值没有有效性问题,则返回true,否则返回false并触发invalid事件.
setCustomValidity(in DOMString error) void设置一个自定义错误,则该元素将无法通过有效性验证.参数指定的字符串就是在向用户报告错误时显示的消息.如果为空字符串,则清除这个自定义错误.
+

 

-- cgit v1.2.3-54-g00ecf