<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Creación de tabla</title>
</head>
<script language="javascript">
var i=0;
var j=0;
var filas=0;
var columnas=0;
function func(){ filas=parseFloat(document.getElementById("f").value); columnas=parseFloat(document.getElementById("c").value); document.write("<table border=1>"); for (i=0; i<filas; i++){ document.write("<tr>"); for(j=0; j<columnas; j++){ document.write("<td> </td>"); }
document.write("</tr>"); }
document.write("</table>"); }
</script>
<body>
<form id="form1" name="form1" method="post" action="">
<p>Filas:
<label for="f"></label>
<input type="text" name="f" id="f" />
</p>
<p>Columnas:
<label for="c"></label>
<input type="text" name="c" id="c" />
</p>
<p>
<input type="button" name="boton" id="boton" value="Submit" onclick="func();"/>
</p>
</form>
</body>
</html>