Skip to content

Commit 38cf6c9

Browse files
authored
Add an example for customizable select
1 parent 0cb27c8 commit 38cf6c9

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
@@ -54809,12 +54809,50 @@ interface <dfn interface>HTMLSelectElement</dfn> : <span>HTMLElement</span> {
5480954809
&hellip;</code></pre>
5481054810
</div>
5481154811

54812+
<div class="example" id="example-customizable-select">
54813+
<p>Here is an example which uses <code>div</code>, <code>legend</code>,
54814+
<code>img</code>, <code>button</code>, and <code>selectedcontent</code> elements:</p>
54815+
54816+
<pre><code class="html">&lt;select>
54817+
&lt;button>
54818+
&lt;selectedcontent>&lt;/selectedcontent>
54819+
&lt;/button>
54820+
&lt;div class="border">
54821+
&lt;optgroup>
54822+
&lt;legend>WHATWG Specifications&lt;/legend>
54823+
&lt;option>
54824+
&lt;img src="html.jpg" alt="">
54825+
HTML
54826+
&lt;/option>
54827+
&lt;option>
54828+
&lt;img src="dom.jpg" alt="">
54829+
DOM
54830+
&lt;/option>
54831+
&lt;/optgroup>
54832+
&lt;/div>
54833+
&lt;div class="border">
54834+
&lt;optgroup>
54835+
&lt;legend>W3C Specifications&lt;/legend>
54836+
&lt;option>
54837+
&lt;img src="forms.jpg" alt="">
54838+
CSS Form Control Styling
54839+
&lt;/option>
54840+
&lt;option>
54841+
&lt;img src="pseudo.jpg" alt="">
54842+
CSS Pseudo-Elements
54843+
&lt;/option>
54844+
&lt;optgroup>
54845+
&lt;/div>
54846+
&lt;/select></code></pre>
54847+
</div>
54848+
5481254849
<p class="note" id="note-first-button-in-select-not-submit">The first child <code>button</code>
5481354850
element as allowed by the content model of <code>select</code> is not a submit button. It is used
5481454851
to replace the in-page rendering of the <code>select</code> element. Its form submission behavior
5481554852
is prevented because it is <span>inert</span>.</p>
5481654853

5481754854

54855+
5481854856
<h4>The <dfn element><code>datalist</code></dfn> element</h4>
5481954857

5482054858
<dl class="element">

0 commit comments

Comments
 (0)