title: How to disable bootstrap button after one click using javascript
body: <p>How do I disable a Bootstrap button after it is clicked using Javascript.
  I am using the <code>onclick</code> event but it doesn't get disabled. </p>
  
  <p>Code:</p>
  
  <pre><code>&lt;div class="panel-heading"&gt;
      &lt;div class="btn-group pull-right"&gt; 
           &lt;a href="/assign" class="btn btn-success"&gt;Assign&lt;/a&gt;
           &lt;a href="#" class="btn btn-primary" onclick="this.disabled=true"&gt;Upload&lt;/a&gt;
     &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>