title: Enable disabled select input with JavScript
body: <p>I would like to enable a select input that is disabled using JavaScript.</p>
  <p>I have tried doing this using:</p>
  <pre><code>document.querySelector(&quot;#radius&quot;).disabled = false;
  </code></pre>
  <p>And also:</p>
  <pre><code>document.querySelector(&quot;#radius&quot;).removeAttribute(&quot;disabled&quot;);
  </code></pre>
  <p>Neither of these has worked.</p>
  <p>The markup for the select input is:</p>
  <pre><code>&lt;select name=&quot;radius&quot; id=&quot;radius&quot; readonly&gt;
     &lt;option value=&quot;all&quot;&gt;All distances&lt;/option&gt;
        &lt;optgroup label=&quot;Miles&quot;&gt;
          &lt;option value=&quot;5mi&quot; disabled&gt;5 miles&lt;/option&gt;
          &lt;option value=&quot;10mi&quot; disabled&gt;10 miles&lt;/option&gt;
          &lt;option value=&quot;20mi&quot; disabled&gt;20 miles&lt;/option&gt;
      &lt;/optgroup&gt;
      &lt;optgroup label=&quot;Kilometers&quot;&gt;
          &lt;option value=&quot;5km&quot; disabled&gt;5 kilometers&lt;/option&gt;
          &lt;option value=&quot;10km&quot; disabled&gt;10 kilometers&lt;/option&gt;
          &lt;option value=&quot;20km&quot; disabled&gt;20 kilometers&lt;/option&gt;
      &lt;/optgroup&gt;
  &lt;/select&gt;
  </code></pre>