How creat a table in JS java script : :)

I'm trying create one simple thing, so let me try explain, where say "table here" is supposed appear one table with 4 columns and 6 lines of course, with content inside of cells.

Unfortunately I don't know how make this in java script. 

code that I already have below: 

_______________________________

		 <form name="part">
            <p align="center">
            &nbsp;</p>
			<p align="center">
            <font face="Verdana" size="2">Please insert the part ID in the field 
			below:</font></p>
			<p align="center">
            <font face="Verdana" size="2">Part ID</font><font face="Verdana"><font size="2"> </font><input type="text" name="userid" size="19"/></font></p>
			<p align="center"><font face="Verdana"><font size="2">
			<p align="center">
            <input type="button" onclick="check(this.form)" value="Check now" style="font-family: Verdana"/><font face="Verdana" size="2">
			</font>
            <input type="reset" value="Cancel" style="font-family: Verdana"/></p>
        </form>
        <font face="Verdana" size="2">
        <script language="javascript">
            function check(form) { 
                if(form.userid.value == "1"){
                   document.write("table here");
        		}
                else if(form.userid.value == "2"){
                   document.write("table 2 here");
                } 
                 else {
                    alert("The Part does not esxist\nor does not have compatibility")  }
            }
        </script>
</font>

________________________________

I hope that you can help me! :)

