<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title></title>
</head>
<body>
<script type="text/javascript">
//双重for循环打印矩阵
var str = ''
for(var i=0;i<9;i++){
for(var j=0;j<=9;j++){
if(j==9){
str +='\n';
}else{
str+=(1+'');
}
}
}
console.log(str)
var ste = ''
for(i=1;i<=9;i++){
for(j=1;j<=i;j++){
if(j==i){
ste += j+'×'+i+'='+i*j+' '+'\n'
break
}else{
ste += j+'×'+i+'='+i*j+' '
}
}
}
console.log(ste)
</script>
</body>
</html>