title: Adding a button with innerHTML property
body: <p>I'm trying to add html code inside a <code>&lt;span id="options"&gt;&lt;/span&gt;</code> so I'm trying to use this:</p>
  
  <pre><code>function editTextArea(element) {
     var options = document.getElementById("options");
     options.innerHTML = options.innerHTML + "Cols: &lt;input type='text' id='colsTextArea' maxlength='3' /&gt;&lt;br&gt;Rows: &lt;input type='text' id='rowsTextArea' maxlength='2' /&gt;&lt;br&gt;&lt;button type='button' onclick='updateTextArea('" + element.id + "')' &gt;Add&lt;/button&gt;&lt;br&gt;";
  }
  </code></pre>
  
  <p>But this is what I got,</p>
  
  <pre><code>&lt;button type="button" onclick="updateTextArea(" textarea0')'=""&gt;Agregar&lt;/button&gt;
  </code></pre>
  
  <p>My problem is with the quotes, so I later tried using createElement("button"), but now I can't add the onclick attribute.</p>
  
  <p>I'm not using jQuery, so it would be nice to have a solution without it.</p>