title: Inserting a Button into HTML Cell
body: <p>I am currently trying to get this buttons into my HTML table.</p>
  <p>This is the code I want to insert:</p>
  <pre><code>&lt;button class=\&quot;btn btn-primary btn-xs my-xs-btn\&quot; type='button' onClick='changeRec(&quot;.$num.&quot;)' &gt;
  &lt;span class=\&quot;glyphicon glyphicon-pencil\&quot;&gt;&lt;/span&gt; Edit
  &lt;/button&gt;
  </code></pre>
  <p>And here is my attempt at inserting it.</p>
  <pre><code>&lt;button type=&quot;button&quot; class=&quot;btn btn-primary btn-lg&quot; onclick=&quot;myFunction()&quot;&gt;Add&lt;/button&gt;
  
  &lt;script&gt;
  function myFunction() {
  var table = document.getElementById(&quot;myTable&quot;);
  var row = table.insertRow(-1);
  var cellInstruction = row.insertCell(-1);
  cellInstruction.innerHTML = '&lt;button class=\&quot;btn btn-primary btn-xs my-xs-btn\&quot; type='button' onClick='changeRec(&quot;.$num.&quot;)' &gt;
                              &lt;span class=\&quot;glyphicon glyphicon-pencil\&quot;&gt;&lt;/span&gt; Edit
                          &lt;/button&gt;';
  }
  &lt;/script&gt;
  </code></pre>