title: Change the button from disabled='true' to 'false'
body: <p>I have written a code regarding a submit form. When I click the <code>button(Download)</code>, the status is disabled, and I want to make it enabled, but if I add an alert box between submit and make the disable false, it works. If I remove the alert box, it doesn't work. Is that the time problem or else? How can I solve it? </p>
  
  <p>How can I change the button from <code>disabled='true'</code> to <code>'false'</code>?</p>
  
  <p>Here is my code:</p>
  
  <pre><code>&lt;div id="fm" class="btnStyleFunc" onclick="disabled='true';submitform()"&gt;
                                      &lt;a&gt;&lt;span&gt;Download&lt;/span&gt;&lt;/a&gt;
                                              &lt;/div&gt;
  </code></pre>
  
  <hr>
  
  <pre><code>function submitform(){
      var element1 = document.getElementById('form');
  
      if (element1 != null){
      } else {        
      }
  
      document.getElementById('form').submit();
      alert('test');   // &lt;--------
      document.getElementById('fm').disabled = false;
  }
  </code></pre>