title: plain text to input text on click using javascript
body: <p>I have a table that needs edit buttons in each row, on click the plain text should become input, I've read many tutorial but i understand none as i am new to javascript, can anyone help? 
  this is what i started with: </p>
  
  <pre><code>    &lt;script type="text/javascript"&gt;
                  function Edit(clickedButton){
  
      //get row of the clicked button 
      var row = clickedButton.closest('tr'); 
  'retrieve each info 
      var tdID = row.cells[0];
      var tdFirstName = row.cells[1];
      var tdLastName = row.cells[2];
      var tdDOB = row.cells[3];
      var tdGender = row.cells[4];
      var tdStatud = row.cells[5];
          &lt;/script&gt;
  </code></pre>
  
  <p>and this in my table:</p>
  
  <pre><code>&lt;table id="table" class="table .table-bordered" style="width:80%"&gt;
              &lt;thead&gt;
                  &lt;tr&gt;
                      &lt;th&gt;ID&lt;/th&gt;
                      &lt;th&gt;First Name&lt;/th&gt;
                      &lt;th&gt;Last Name&lt;/th&gt;
                      &lt;th&gt;DOB&lt;/th&gt;
                      &lt;th&gt;Gender&lt;/th&gt;
                      &lt;th&gt;Martial Status&lt;/th&gt;
                      &lt;th&gt;Action&lt;/th&gt;
                  &lt;/tr&gt;
              &lt;/thead&gt;
              &lt;tbody&gt;
                  &lt;tr id="frow"&gt;
                      &lt;td&gt;1&lt;/td&gt;
                      &lt;td&gt;Samir&lt;/td&gt;
                      &lt;td&gt;Khattar&lt;/td&gt;
                      &lt;td&gt;1-12-1990&lt;/td&gt;
                      &lt;td&gt;Male&lt;/td&gt;
                      &lt;td&gt;Married&lt;/td&gt;
                      &lt;td&gt;
                          &lt;button onclick="Edit(this)"&gt;Edit&lt;/button&gt;
                          &lt;button onclick="Delete(this)"&gt;Delete&lt;/button&gt;
                      &lt;/td&gt;
                  &lt;/tr&gt;
              &lt;/tbody&gt;
          &lt;/table&gt;
  </code></pre>
  
  <p>and whats the difference between .innerhtml and .html</p>