title: How to add attribute to HTML element using javascript
body: <p>Using javascript (preferably not jquery) I'm trying to change the line:</p>
  
  <pre><code>&lt;input type="number" name="price" required="" id="id_price"&gt;
  </code></pre>
  
  <p>into</p>
  
  <pre><code>&lt;input type="number" name="price" required="" id="id_price" step="any"&gt;
  </code></pre>
  
  <p>I know the solution's got to be easy but I just can't crack it. Help would be much appreciated!!</p>