title: How to disable HTML button using JavaScript?
body: <p>I’ve read that you can disable (make physically unclickable) an HTML button simply by appending <code>disable</code> to its tag, but not as an attribute, as follows:</p>
  
  <pre><code>&lt;input type="button" name=myButton value="disable" disabled&gt;
  </code></pre>
  
  <p>Since this setting is not an attribute, how can I add this in dynamically via JavaScript to disable a button that was previously enabled?</p>