title: How to create form elements input box , label using javascript onclick
body: <p>i would like to know how to create a hidden type input box and labels using javascript by onclick function. </p>
  
  <pre><code>$().ready(function() {  
      $("#product").autocomplete("get_completeproducts", {            
          width: 406,
          matchContains: true,
          selectFirst: false
      });
  });
  
  
  &lt;input type="text" value="" name="product" id="product" size="50"&gt;
  &lt;input type="button" value="Add to List" onclick="addprotolist()" name="select_pro"&gt;
  </code></pre>
  
  <p>i am getting the above input box value through ajax auto complete , the user will click on the select box , then what i have to do is , i have to add list them the number of selected phones bellow the input box like</p>
  
  <pre><code>&lt;label&gt;Samsung Galaxy Y&lt;label&gt;&lt;input type="hidden" value="778" name="pro_id[]"&gt;
  &lt;label&gt;Samsung Galaxy Y Duos&lt;label&gt;&lt;input type="hidden" value="788" name="pro_id[]"&gt;
  &lt;label&gt;Samsung Galaxy Y Plus&lt;label&gt;&lt;input type="hidden" value="728" name="pro_id[]"&gt;
  .
  .
  .
  &lt;input type="submit" name="save" value="Save your list"&gt;
  </code></pre>
  
  <p>anybody can provide me how to code this using javascript or jquery. </p>