调试运行
<html> <head> <title>随机函数</title> </head> <body> <script language="javascript"> <!-- for(i=1;i<=5;i++){ num = Math.floor(Math.random() * 10); document.write(num," "); } //--> </script> </body> </html>