title: Log Solutions In Table
body: <p>I need help please.I created a calculator and wondering how i can make it to show the result both on the textbox and create a log on a column.
      One for the question and another column for the answer./*
     <a href="http://jsfiddle.net/jrsr/2kxez0rz/" rel="nofollow">Fiddle link</a></p>
  
  <pre><code>&lt;input type="button" value="=" 
  
  onClick="document.calculator.ans.value=eval
  
  (document.calculator.ans.value); addlog();" /&gt;
  &lt;/form&gt; 
  &lt;br&gt;
  
  &lt;table id="myTable"&gt;
    &lt;tr&gt;
  
    &lt;/tr&gt;
  
  
  
  &lt;script&gt;
  
  function addlog()
  {
      var table = document.getElementById("myTable");
      var row = table.insertRow(0);
      var cell1 = row.insertCell(0);
      var cell2 = row.insertCell(1);
      cell1.innerHTML = "Question";
      cell2.innerHTML = "solution";
  }
  &lt;/script&gt;
  </code></pre>