document的使用以及js打印99乘法表

1.document.write()可以向页面直接输出语句,把内容输出在页面上。write内可以写html的代码,也可以写基本内容

document.write("")里面是双引号,如果要设置标签的属性,要写为单引号

document.write("")可以输出变量,也可以输出html代码

document.write

2.打印99乘法表


   
    html示例
   
   
		
1*1=1
2*1=22*2=4
3*1=33*2=63*3=9
4*1=44*2=84*3=124*4=16
5*1=55*2=105*3=155*4=205*5=25
6*1=66*2=126*3=186*4=246*5=306*6=36
7*1=77*2=147*3=217*4=287*5=357*6=427*7=49
8*1=88*2=168*3=248*4=328*5=408*6=488*7=568*8=64
9*1=99*2=189*3=279*4=369*5=459*6=549*7=639*8=729*9=81

 

 

你可能感兴趣的:(javascript)