<!DOCTYPE html>

<html>

<head>

<meta charset="utf-8">

<title></title>

</head>

<body>

<script type="text/javascript">

//for循环的嵌套

for(var i=1;i<=3;i++){

document.write('外层循环循环第'+i+'次的结果<br/>');

for(var j=1;j<=2;j++){

document.write('内层循环循环第'+j+'次的结果<br/>');

}

document.write('<hr/>');

}

</script>

<table border='1' cellpadding="0" cellpadding="0" bgcolor="aqua" width='80%'>

<script type="text/javascript">

for(var i=1;i<=3;i++){

document.write('<tr>');

for(var j=1;j<=30;j++){

document.write('<td>x</td>');

}

document.write('</tr>');

}

</script>

</table>

<script type="text/javascript">

document.write('<hr color="red"/>');

document.write('<table border="1" cellpadding="0" cellspacing="0" bgcolor="#ABCDEF" width="80%">');

for(var i=1;i<=9;++i){

document.write('<tr>');

for(var j=1;j<=i;j++){

document.write('<td>'+i+'x'+j+'='+(i*j)+'</td>');

}

document.write('</tr>');

}

document.write('</table>');

//打印倒得99乘法表

//通过for循环实现百钱买百得题

//公鸡5元每只,母鸡3元每只,小鸡3只1元,100元可以买多少只鸡

</script>

</body>

</html>