【Web】JavaScript(No.47)for循环案例(二)

时间:2023-05-04 14:50:17
【文件属性】:

文件名称:【Web】JavaScript(No.47)for循环案例(二)

文件大小:1KB

文件格式:HTML

更新时间:2023-05-04 14:50:17

HTML

【Web】JavaScript(No.47)for循环案例(二)打印九九乘法表<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>九九乘法表</title> <style type="text/css"> td{ background-color: greenyellow; } .ys{ color: orangered; } </style> </head> <body>

js打印九九乘法表

[removed] //打印九九乘法表 [removed](""); for(var i = 1; i <= 9; i++){ if(i%2==0){ [removed](""); for(var j =1; j <= i; j++){ [removed](""); } [removed](""); } else{ [removed](""); for(var j =1; j <= i; j++){ [removed](""); } [removed](""); } } [removed]("
" + j + " × " + i + " = " + i*j + "     " + "
" + j + " × " + i + " = " + i*j + "     " + "
"); [removed] </body> </html>


网友评论