2011-12-16 乱数(javascript) 1から10までの乱数を7個生成する。 <html> <head> <title>テスト</title> </head> <body> <script type="text/javascript"> <!-- for(i = 0; i < 7; i++) { document.write(Math.floor(Math.random()*10+1) + "<br>"); } // --> </script> </body> </html>