For..each 循环

  1. <html>
  2. <body>
  3.  
  4. <script type="text/vbscript">
  5. dim names(2)
  6. names(0) = "George"
  7. names(1) = "John"
  8. names(2) = "Thomas"
  9.  
  10. for each x in names
  11. document.write(x & "<br />")
  12. next
  13. </script>
  14.  
  15. </body>
  16. </html>