来一个老生常谈的话题--九九乘法表,哈哈,好久不写了呢
<!DOCTYPE html> <html> <head lang="en"> <meta charset="UTF-8"> <title></title> <style> th{ border: #ccc 1px solid; font-weight: normal; } </style> </head> <body> <script> document.write('<table>'); for(var i = 0; i <= 9; i++){ document.write('<tr>'); for(var j = 1; j <= i; j++){ document.write('<th>' + j + '*' + i + '=' + ( j * i )+ '</th>'); } document.write('</tr>'); } document.write('</table>'); </script> </body> </html>