<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Document</title>
<style>
span{
width: 21px;
height: 21px;
display: inline-block;
}
</style>
</head>
<body>
<!-- 九九乘法口诀表
1*1=1
1*2=2 2*2=4
1*3=3 2*3=6 3*3=9
1*4=4 2*4=8 3*4=12 4*4=16
1*5=5 2*5=10 3*5=15 4*5=20 5*5=25
-->
<script>
//循环九行
for (var n = 1; n < 10; n++) {
//循环输出每行内容
for (var m = 1; m <= n; m++) {
document.write(m + "*" + n + "=" + (m * n) + "<span> </span>");
}
document.write("<br/>");
}
</script>
</body>
</html>