title: how to display answers of form fill in inside a table?
body: <p>I have a question, we were required to do a form fill in which must contain a user name, first name, last name, and gender, what should i do for the inputted values to be displayed inside a table after pressing a button?</p>
  
  <pre><code>&lt;html&gt;
  &lt;head&gt;
  
  &lt;script&gt;
  function myfunction() {
  var fn = document.form1.firstname;
  var ln = document.form1.lastname;
  var un= document.form1.unsername;
  var g = document.form1.gender;
  
  first = first + fn.getElementById("firstname").value;
  last = last + ln.getElementById("lastname").value;
  user = user + un.getElementById("username").value;
  gend= gend + g.getElementById("gender").value;
  
  document.getElementById("displayhere").innerHTML;
  }
  &lt;/script&gt;
  
  &lt;/head&gt;
  
  &lt;body&gt;
  &lt;form id="formname"&gt;
  first name: &lt;input type="text" id="firstname"&gt;
  last name: &lt;input type="text" id="lastname"&gt;
  gender: &lt;input type="text" id="gender"&gt;
  username: &lt;input type="text" id="username"&gt;
  &lt;button onclick="myfunction()"&gt;Send&lt;/button&gt;
  &lt;/form&gt;
  
  Details:
  
  &lt;table&gt;
  &lt;tr&gt;&lt;td&gt;&lt;p id="displayhere"&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;
  &lt;/table&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>