<script>
var s = +prompt("输入行数"),x = +prompt("输入列数");
document.write("<table border=1px> ");
for( var a = 1; a <=s; a++) {
document.write("<tr>");
for( var b = 1 ; b <= x; b++) {
document.write("<td>"+b+"X"+a+"="+a*b);
document.write("<td>");
}
document.write("</tr>");
}
document.write("</table> ");
</script>