HTMLObjectElement:checkValidity() 方法

Baseline Widely available

This feature is well established and works across many devices and browser versions. It’s been available across browsers since December 2018.

HTMLObjectElement 接口的只读属性返回的 checkValidity() 方法返回一个总是 true 的布尔值,因为 object 对象从来都不是约束验证的候选者。

语法

js
checkValidity()

参数

无。

返回值

true

异常

无。

规范

Specification
HTML
# dom-cva-checkvalidity-dev

浏览器兼容性

Report problems with this compatibility data on GitHub
desktopmobile
Chrome
Edge
Firefox
Opera
Safari
Chrome Android
Firefox for Android
Opera Android
Safari on iOS
Samsung Internet
WebView Android
WebView on iOS
checkValidity

Legend

Tip: you can click/tap on a cell for more information.

Full support
Full support