MDN wants to learn about developers like you: https://qsurvey.mozilla.com/s3/MDN-dev-survey

HTMLSelectElement.setCustomValidity()

这篇翻译不完整。请帮忙从英语翻译这篇文章

HTMLSelectElement.setCustomValidity() 方法设置指定的验证消息为选择元素的自定义验证消息。

使用空字符串来表示该元素没有自定义的验证错误。

Syntax

selectElt.setCustomValidity(string);

Parameters

  • string is the DOMString containing the error message.

Specifications

Specification Status Comment
WHATWG HTML Living Standard
HTMLSelectElement.setCustomValidity()
Living Standard No change since the latest snapshot, HTML5.
HTML5
HTMLSelectElement.setCustomValidity()
Recommendation Initial definition, snapshot of WHATWG HTML Living Standard

Browser compatibility

Feature Chrome Edge Firefox (Gecko) Internet Explorer Opera Edge Safari (WebKit)
Basic support (Yes) (Yes) 4.0 (2.0) (Yes) ? (Yes) ?
Feature Android Chrome Edge Firefox Mobile (Gecko) Firefox OS IE Phone Opera Mobile Safari Mobile
Basic support ? ? (Yes) 4.0 (2.0) 1.0 ? ? ?

See also

文档标签和贡献者

 此页面的贡献者: xgqfrms-GitHub
 最后编辑者: xgqfrms-GitHub,