ASCII码 ASCII码

利用for循环做99乘法表

发布于:2022-05-18 12:21:10  栏目:技术文档

99乘法表

<!DOCTYPEhtml>
<htmllang="en">
<head>
<metacharset="UTF-8">
<metahttp-equiv="X-UA-Compatible"content="IE=edge">
<metaname="viewport"content="width=device-width,initial-scale=1.0">
<title>Document</title>
</head>
<body>
<script>
document.write('<tableborder="1"width="800"align="center">');
for(varrow=9;row>0;row--){
document.write('<tr>')
for(varcol=1;col<=row;col++){
varstr=col+'x'+row+'='+(row*col);
document.write('<td>'+str+'</td>');
}
document.write('<tr/>');

}
document.write('</table>');
</script>
</body>
</html>
运行实例 »

点击 "运行实例" 按钮查看在线实例

相关推荐
阅读 +