几行代码就能轻松学会
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>九九乘法表</title>
</head>
<style>
div{
width: 80px;
display: inline-block;
font-size: 18px;
background-color: lawngreen;
}
table td{
width: 80px;
}
</style>
<body>
<script>
for(var i=1;i<=9;i++){
for(var j=1;j<=i;j++){
document.write('<div>'+i+'*'+j+'='+i*j+'</div>');
}
document.write('<br />');
}
</script>
</body>
</html>