Automatiacally Generating text input and dropdown select on click using javascript/Jquery
<p>I am trying to build a system like when any user clicks on an "Add" button, it creates two text fields and two drop down selects automatically. I searched on google for the tutorial but all I have managed to find is only how to add text fields, but I need to add Select drop down with remove option.</p>

<p>I have some knowledge in PHP but little in Javascript or Jquery. </p>

<p>Would you please kindly help?  </p>

<p>Here is the code that I have found:</p>

<pre><code>&lt;html&gt;
&lt;head&gt;
&lt;meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /&gt;
&lt;title&gt;Untitled Document&lt;/title&gt;

&lt;script&gt;
function generateRow() {

var d=document.getElementById("div");
d.innerHTML+="&lt;p&gt;&lt;input type='text' name='food'&gt;";

var e=document.getElementById("div");
e.innerHTML+="&lt;input type='text' name='food'&gt;";

}
&lt;/script&gt;
&lt;/head&gt;

&lt;body&gt;
 &lt;form id="form1" name="form1" method="post" action=""&gt;
&lt;label&gt;
 &lt;input name="food" type="text" id="food" /&gt;
&lt;/label&gt;

  &lt;div id="div"&gt;&lt;/div&gt;
  &lt;p&gt;&lt;input type="button" value="Add" onclick="generateRow()"/&gt;&lt;/p&gt;
  &lt;p&gt;
  &lt;label&gt;
   &lt;input type="submit" name="Submit" value="Submit" /&gt;
  &lt;/label&gt;
  &lt;/p&gt;
  &lt;/form&gt;
  &lt;/body&gt;
 &lt;/html&gt;
</code></pre>
