diff options
author | Peter Bengtsson <mail@peterbe.com> | 2020-12-08 14:43:23 -0500 |
---|---|---|
committer | Peter Bengtsson <mail@peterbe.com> | 2020-12-08 14:43:23 -0500 |
commit | 218934fa2ed1c702a6d3923d2aa2cc6b43c48684 (patch) | |
tree | a9ef8ac1e1b8fe4207b6d64d3841bfb8990b6fd0 /files/zh-tw/web/api/htmlselectelement/setcustomvalidity | |
parent | 074785cea106179cb3305637055ab0a009ca74f2 (diff) | |
download | translated-content-218934fa2ed1c702a6d3923d2aa2cc6b43c48684.tar.gz translated-content-218934fa2ed1c702a6d3923d2aa2cc6b43c48684.tar.bz2 translated-content-218934fa2ed1c702a6d3923d2aa2cc6b43c48684.zip |
initial commit
Diffstat (limited to 'files/zh-tw/web/api/htmlselectelement/setcustomvalidity')
-rw-r--r-- | files/zh-tw/web/api/htmlselectelement/setcustomvalidity/index.html | 50 |
1 files changed, 50 insertions, 0 deletions
diff --git a/files/zh-tw/web/api/htmlselectelement/setcustomvalidity/index.html b/files/zh-tw/web/api/htmlselectelement/setcustomvalidity/index.html new file mode 100644 index 0000000000..54e47edf3c --- /dev/null +++ b/files/zh-tw/web/api/htmlselectelement/setcustomvalidity/index.html @@ -0,0 +1,50 @@ +--- +title: HTMLSelectElement.setCustomValidity() +slug: Web/API/HTMLSelectElement/setCustomValidity +translation_of: Web/API/HTMLSelectElement/setCustomValidity +--- +<div>{{ APIRef("HTML DOM") }}</div> + +<p><code><strong>HTMLSelectElement.setCustomValidity()</strong></code> 方法可為指定的元素設定自定義檢核訊息。使用空字串表示元素<em>沒有</em>發生違反自定檢核條件的錯誤。</p> + +<h2 id="語法">語法</h2> + +<pre class="eval language-html"><code class="language-html"><em>selectElt</em>.setCustomValidity(<em>string</em>);</code></pre> + +<h3 id="參數">參數</h3> + +<ul> + <li><em>string</em> 為 {{domxref("DOMString")}},代表錯誤訊息。</li> +</ul> + +<h2 id="規範">規範</h2> + +<table class="standard-table"> + <tbody> + <tr> + <th scope="col">規範</th> + <th scope="col">狀態</th> + <th scope="col">意見</th> + </tr> + <tr> + <td>{{SpecName('HTML WHATWG', '#dom-cva-setcustomvalidity', 'HTMLSelectElement.setCustomValidity()')}}</td> + <td>{{Spec2('HTML WHATWG')}}</td> + <td>No change since the latest snapshot, {{SpecName('HTML5 W3C')}}.</td> + </tr> + <tr> + <td>{{SpecName('HTML5 W3C', 'forms.html#dom-cva-setcustomvalidity', 'HTMLSelectElement.setCustomValidity()')}}</td> + <td>{{Spec2('HTML5 W3C')}}</td> + <td>Initial definition, snapshot of {{SpecName('HTML WHATWG')}}</td> + </tr> + </tbody> +</table> + +<h2 id="瀏覽器相容性">瀏覽器相容性</h2> + +<p>{{Compat("api.HTMLSelectElement.setCustomValidity")}}</p> + +<h2 id="參見">參見</h2> + +<ul> + <li><a href="/zh-TW/docs/Web/Guide/HTML/HTML5/Constraint_validation">表單驗證</a></li> +</ul> |