当前位置 : 主页 > 网页制作 > html >

九九乘法表

来源:互联网 收集:自由互联 发布时间:2021-06-12
!DOCTYPE html html lang= "en" head meta charset= "UTF-8" title九九乘法表 /title style td{ border: 1 px solid red ; } /style script document. write( "table align=‘center‘") ; for ( var i = 1 ; i = 9 ; i++) { document. write( "tr") ;
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>九九乘法表</title>
<style>
td{
border: 1px solid red;
}
</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>");
document.write(j + "*" + i + "=" + (i * j) + "&nbsp;&nbsp;&nbsp;");
document.write("</td>");
}
/*document.write("<br/>")*/
document.write("<tr>");
}
document.write("</table>")
</script>
</head>
<body>


</body>
</html>
网友评论