<SCRIPT TYPE="text/JavaScript"> <-- var a = new Array(5); // 配列 a の宣言 //--> </SCRIPT> |
<SCRIPT TYPE="text/JavaScript"> <-- var a = new Array(5); // (1) var b = new Array(5); // (2) var i; a[0] = "消しゴム"; a[1] = "鉛筆"; a[2] = "ボールペン"; a[3] = "筆箱"; a[4] = "定規"; b[0] = 50; b[1] = 70; b[2] = 100; b[3] = 500; b[4] = 250; document.write( "<FONT SIZE='4'>文房具の価格表</FONT>" ); // (3) document.write( "<TABLE BORDER='2'>" ); for( i = 0 ; i < 5 ; i++ ) { document.write( "<TR><TD>", a[i], "</TD>" ); document.write( "<TD>", b[i], "</TD></TR>" ); } document.write( "</TABLE>" ); //--> </SCRIPT> |
now = new Date(); |