MDN’s new design is in Beta! A sneak peek: https://blog.mozilla.org/opendesign/mdns-new-design-beta/

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,