跳转到主要内容 跳转到搜索 MDN HTML HTML: Markup language HTML reference Elements Global attributes Attributes See all… HTML guides Responsive images HTML cheatsheet Date & time formats See all… Markup languages SVG MathML XML CSS CSS: Styling language CSS reference Properties Selectors At-rules Values See all… CSS guides Box model Animations Flexbox Colors See all… Layout cookbook Column layouts Centering an element Card component See all… JavaScriptJS JavaScript: Scripting language JS reference Standard built-in objects Expressions & operators Statements & declarations Functions See all… JS guides Control flow & error handing Loops and iteration Working with objects Using classes See all… Web APIs Web APIs: Programming interfaces Web API reference File system API Fetch API Geolocation API HTML DOM API Push API Service worker API See all… Web API guides Using the Web animation API Using the Fetch API Working with the History API Using the Web speech API Using web workers All All web technology Technologies Accessibility HTTP URI Web extensions WebAssembly WebDriver See all… Topics Media Performance Privacy Security Progressive web apps Learn Learn web development Frontend developer course Getting started modules Core modules MDN Curriculum Check out the video course from Scrimba, our partner Learn HTML Structuring content with HTML module Learn CSS CSS styling basics module CSS layout module Learn JavaScript Dynamic scripting with JavaScript module Tools Discover our tools Playground HTTP Observatory Border-image generator Border-radius generator Box-shadow generator Color format converter Color mixer Shape generator About Get to know MDN better About MDN Advertise with us Community MDN on GitHub Blog 切换侧边栏 面向开发者的 Web 技术 Web API HTMLObjectElement HTMLObjectElement:checkValidity() 方法 主题 跟随系统 浅色 深色 中文 (简体) 记住语言 了解更多 Deutsch English (US) Français 日本語 中文 (简体) 此页面由社区从英文翻译而来。了解更多并加入 MDN Web Docs 社区。 View in English Always switch to English HTMLObjectElement:checkValidity() 方法 基线 广泛可用 自 2015年7月 起,此特性已在主流浏览器中得到支持,可在大多数设备和浏览器版本中正常使用。 了解更多 查看完整兼容性 > HTMLObjectElement 接口的只读属性返回的 checkValidity() 方法返回一个总是 true 的布尔值,因为 object 对象从来都不是约束验证的候选者。 语法 jscheckValidity() 参数 无。 返回值 true 异常 无。 规范 规范 HTML># dom-cva-checkvalidity-dev> 浏览器兼容性 启用 JavaScript 以查看此浏览器兼容性表。