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

HTMLSelectElement.setCustomValidity()

翻譯不完整。請協助 翻譯此英文文件

HTMLSelectElement.setCustomValidity() 方法可為指定的元素設定自定義檢核訊息。使用空字串表示元素沒有發生違反自定檢核條件的錯誤。

語法

selectElt.setCustomValidity(string);

參數

  • stringDOMString,代表錯誤訊息。

規範

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

瀏覽器相容性

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 ? ? ?

參見

文件標籤與貢獻者

 此頁面的貢獻者: jackblackevo
 最近更新: jackblackevo,