dropdown menu in html using javascript
<p>Hey i am writing a script for dynamic dropdown menu generator
my javascript is as follow</p>

<pre><code>function add1(type) {
     var element = document.createElement("select");
     var label=prompt("Enter the name for lable","");
     labels.push(label);

     document.getElementById('raj').innerHTML=document.getElementById('raj').innerHTML+label+": : ";
     element.setAttribute("type", type);
     element.setAttribute("name",label);

     var no=prompt("Total no of fields in radio button ");

     for(var i=1;i&lt;=no;i++)
     {
        var val=prompt('Enter value');     

     document.getElementById('raj').innerHTML=document.getElementById('raj').innerHTML+val+" ";
     element.setAttribute("value",val);
     var rohit = document.getElementById("raj");
    rohit.appendChild(element);

     }

     document.getElementById('raj').innerHTML=document.getElementById('raj').innerHTML+"&lt;br/&gt;";


}
</code></pre>

<p>but i m unable to design the dropdown</p>

<p>HTML:</p>

<pre><code>&lt;input type="button" value="Radio Button" onclick="add1('radio')"&gt;&lt;br/&gt;
&lt;input type="button" value="Check Box" onclick="add1('checkbox')"&gt;&lt;br/&gt;
&lt;input type="button" value="Text Area" onclick="add2('textarea')"&gt;&lt;br/&gt;
&lt;input type="button" value="Email" onclick="emial('email')"&gt;&lt;br/&gt; &lt;/div&gt;
&lt;div id="content" style="height:200px;width:400px;float:left;"&gt;
&lt;span id="raj"&gt;&lt;/span&gt;
</code></pre>
