snipt

Ctrl+h for KB shortcuts

HTML

Editable Selector

1
2
3
4
5
6
7
<select id="combo4" style="width: 200px;" onchange="$('input#text4').val($(this).val());">
    <option>option 1</option>
    <option>option 2</option>
    <option>option 3</option>
</select>

<input id="text4" style="margin-left: -203px; width: 180px; height: 1.2em; border: 0;" />
https://snipt.net/embed/fc96b535ed70199346d352f3f5d5b1d7/
/raw/fc96b535ed70199346d352f3f5d5b1d7/
fc96b535ed70199346d352f3f5d5b1d7
html
HTML
7
2019-07-24T00:27:52
True
False
False
/api/public/snipt/54411/
editable-selector
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><a href="#L-1">1</a> <a href="#L-2">2</a> <a href="#L-3">3</a> <a href="#L-4">4</a> <a href="#L-5">5</a> <a href="#L-6">6</a> <a href="#L-7">7</a></pre></div></td><td class="code"><div class="highlight"><pre><span></span><span id="L-1"><a name="L-1"></a><span class="p">&lt;</span><span class="nt">select</span> <span class="na">id</span><span class="o">=</span><span class="s">&quot;combo4&quot;</span> <span class="na">style</span><span class="o">=</span><span class="s">&quot;width: 200px;&quot;</span> <span class="na">onchange</span><span class="o">=</span><span class="s">&quot;$(&#39;input#text4&#39;).val($(this).val());&quot;</span><span class="p">&gt;</span> </span><span id="L-2"><a name="L-2"></a> <span class="p">&lt;</span><span class="nt">option</span><span class="p">&gt;</span>option 1<span class="p">&lt;/</span><span class="nt">option</span><span class="p">&gt;</span> </span><span id="L-3"><a name="L-3"></a> <span class="p">&lt;</span><span class="nt">option</span><span class="p">&gt;</span>option 2<span class="p">&lt;/</span><span class="nt">option</span><span class="p">&gt;</span> </span><span id="L-4"><a name="L-4"></a> <span class="p">&lt;</span><span class="nt">option</span><span class="p">&gt;</span>option 3<span class="p">&lt;/</span><span class="nt">option</span><span class="p">&gt;</span> </span><span id="L-5"><a name="L-5"></a><span class="p">&lt;/</span><span class="nt">select</span><span class="p">&gt;</span> </span><span id="L-6"><a name="L-6"></a> </span><span id="L-7"><a name="L-7"></a><span class="p">&lt;</span><span class="nt">input</span> <span class="na">id</span><span class="o">=</span><span class="s">&quot;text4&quot;</span> <span class="na">style</span><span class="o">=</span><span class="s">&quot;margin-left: -203px; width: 180px; height: 1.2em; border: 0;&quot;</span> <span class="p">/&gt;</span> </span></pre></div> </td></tr></table>
html, jquery