创建数组

  1. <html>
  2. <body>
  3.  
  4. <script type="text/vbscript">
  5.  
  6. dim fname(5)
  7. fname(0) = "George"
  8. fname(1) = "John"
  9. fname(2) = "Thomas"
  10. fname(3) = "James"
  11. fname(4) = "Adrew"
  12. fname(5) = "Martin"
  13.  
  14. for i=0 to 5
  15. document.write(fname(i) & "<br />")
  16. next
  17.  
  18. </script>
  19.  
  20. </body>
  21. </html>