Skip to content

Commit a6e6541

Browse files
josepharhardomenic
authored andcommitted
Add examples for customizable select
1 parent 172cccf commit a6e6541

File tree

1 file changed

+38
-0
lines changed

1 file changed

+38
-0
lines changed

source

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54822,12 +54822,50 @@ interface <dfn interface>HTMLSelectElement</dfn> : <span>HTMLElement</span> {
5482254822
&hellip;</code></pre>
5482354823
</div>
5482454824

54825+
<div class="example">
54826+
<p>Here is an example which uses <code>div</code>, <code>legend</code>,
54827+
<code>img</code>, <code>button</code>, and <code>selectedcontent</code> elements:</p>
54828+
54829+
<pre><code class="html">&lt;select>
54830+
&lt;button>
54831+
&lt;selectedcontent>&lt;/selectedcontent>
54832+
&lt;/button>
54833+
&lt;div class="border">
54834+
&lt;optgroup>
54835+
&lt;legend>WHATWG Specifications&lt;/legend>
54836+
&lt;option>
54837+
&lt;img src="html.jpg">
54838+
HTML
54839+
&lt;/option>
54840+
&lt;option>
54841+
&lt;img src="dom.jpg">
54842+
DOM
54843+
&lt;/option>
54844+
&lt;/optgroup>
54845+
&lt;/div>
54846+
&lt;div class="border">
54847+
&lt;optgroup>
54848+
&lt;legend>W3C Specifications&lt;/legend>
54849+
&lt;option>
54850+
&lt;img src="forms.jpg">
54851+
CSS Form Control Styling
54852+
&lt;/option>
54853+
&lt;option>
54854+
&lt;img src="pseudo.jpg">
54855+
CSS Pseudo-Elements
54856+
&lt;/option>
54857+
&lt;optgroup>
54858+
&lt;/div>
54859+
&lt;/select></code></pre>
54860+
</div>
54861+
5482554862
<p class="note" id="note-first-button-in-select-not-submit">The first child <code>button</code>
5482654863
element as allowed by the content model of <code>select</code> is not a submit button. It is used
5482754864
to replace the in-page rendering of the <code>select</code> element. Its form submission behavior
5482854865
is prevented because it is <span>inert</span>.</p>
5482954866

5483054867

54868+
5483154869
<h4>The <dfn element><code>datalist</code></dfn> element</h4>
5483254870

5483354871
<dl class="element">

0 commit comments

Comments
 (0)