My code is
problem in this code is function submit is not running it throws some error i couldn't find it.
tell me this code is possible some how
Code:
<script language="javascript">
document.write("<select id=\"num\" onchange=\"selected()\">");
document.write("<option>");
for(i=1;i<=10;i++)
document.write("<option value="+i+">"+i);
document.write("</select>");
function selected()
{
var j;
j=document.getElementById("num").value;
document.write("Table Name <input type='text' id='tname' /><br>")
for(i=1;i<=j;i++)
{
document.write("Attribute"+i+"<input type='text' id='attri"+i+"' />");
document.write("<select name=\"datatype\"><option>int<option>varchar<option>char<option>boolean<option>date</select><br>");
}
document.write("<input type=\"button\" value=\"Ok\" onclick=\"submit\" />");
}
function submit()
{
document.write("hello");
}
</script>
tell me this code is possible some how
Comment