相信大家都知道99乘法表,下面我将用代码来实现这个效果
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>99乘法表</title>
<style>
td{
border: 1px solid;
background-color: yellow;
width: 100px;
height: 20px;
text-align: center;
}
font{
size: 30px;
color: aqua;
}
</style>
<script>
document.write("<table align='center'>");
for(var i = 1;i<=9;i++){
document.write("<tr>");
for(var j = 1;j<=i;j++){
document.write("<td><font>");
document.write(i+"*"+j+"="+(i*j)+" ");
document.write("</font></td>");
}
//document.write("<br>");
document.write("</tr>");
}
document.write("</<table></table>");
</script>
</head>
<body>
</body>
</html>