javaScript编写9*9口诀

it2022-05-06  0

学习html+css+javaScript<!DOCTYPE html> <html> <head> <title>chaoba</title> <style type="text/css"> table,tr{ width: 500px; color:#ff0000; } </style> </head> <body> <script type="text/javascript"> document.write("<table>"); for (var i = 1; i < 9; i++) { document.write("<tr>"); for(var j=1;j<=i;j++){ document.write("<td>"+j+"*"+i+"="+(i*j)+"</td>"); } document.write("</tr>"); } document.write("</table>"); </script> </body> </html>

 

转载于:https://www.cnblogs.com/chaoba/p/6951571.html


最新回复(0)