javascriptで九九表
所要でjavascriptで九九の表を作る必要があった。
ここで晒しておく。
<?xml version="1.0" encoding="utf-8"?> <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="ja" lang="ja"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <meta http-equiv="Content-Style-Type" content="text/css"> <meta http-equiv="Content-Script-Type" content="text/javascript"> <title>くくひょう</title> </head> <body> <script type = "text/javascript"> <!-- document.write ("<table border = 1>"); document.write ("<caption>【くくのひょうだよ(^^)がんばろうね】</caption>"); document.write ("<th><br /></th>"); for(i = 1;i <= 9;i++){ document.write("<th> " + i + " のだん</th>"); } for(i = 1;i <= 9;i++){ document.write ("<tr align = right><td>" + i + "</td>"); for(j = 1;j <= 9;j++){ document.write("<td> " + i * j + "</td>"); } document.write ("</tr>"); } document.write ("</table>"); --> </script> </body> </html>