<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<style>
span {
display: inline-block;
width: 100px;
height: 30px;
line-height: 30px;
}
</style>
</head>
<body>
<script>
for (var m = 1; m <= 9; m++) {
for (var i = 1; i <= m; i++) {
document.write("<span>" + i + " * " + m + " = " + m*i + "</span>")
}
document.write("<br>")
}
</script>
</body>
</html>
JavaScript for循环打印九九口诀表
扫描二维码,在手机上阅读