Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>Nothing is impossible. Here's a solution that simply sets the value of a text input whenever the value of the <code>&lt;select&gt;</code> changes: <strong><a href="http://jsfiddle.net/nwH8A/" rel="noreferrer">Demo on JSFiddle</a></strong><br> Rendering has been tested on Firefox and Google Chrome.</p> <pre><code>&lt;style&gt; .select-editable { position:relative; background-color:white; border:solid grey 1px; width:120px; height:18px; } .select-editable select { position:absolute; top:0px; left:0px; font-size:14px; border:none; width:120px; margin:0; } .select-editable input { position:absolute; top:0px; left:0px; width:100px; padding:1px; font-size:12px; border:none; } .select-editable select:focus, .select-editable input:focus { outline:none; } &lt;/style&gt; &lt;div class="select-editable"&gt; &lt;select onchange="this.nextElementSibling.value=this.value"&gt; &lt;option value=""&gt;&lt;/option&gt; &lt;option value="115x175 mm"&gt;115x175 mm&lt;/option&gt; &lt;option value="120x160 mm"&gt;120x160 mm&lt;/option&gt; &lt;option value="120x287 mm"&gt;120x287 mm&lt;/option&gt; &lt;/select&gt; &lt;input type="text" name="format" value=""/&gt; &lt;/div&gt; </code></pre> <p>You can also do this in HTML5 with the input <code>list</code> attribute and <a href="https://developer.mozilla.org/en-US/docs/Web/HTML/Element/datalist" rel="noreferrer"><code>&lt;datalist&gt;</code> element</a>:</p> <pre><code>&lt;input list="browsers" name="browser"&gt; &lt;datalist id="browsers"&gt; &lt;option value="Internet Explorer"&gt; &lt;option value="Firefox"&gt; &lt;option value="Chrome"&gt; &lt;option value="Opera"&gt; &lt;option value="Safari"&gt; &lt;/datalist&gt; </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload