Select case 语句

  1. <html>
  2.  
  3. <body>
  4. <script type="text/vbscript">
  5. d=weekday(date)
  6.  
  7. select case d
  8. case 1
  9. document.write("Sleepy Sunday")
  10. case 2
  11. document.write("Monday again!")
  12. case 3
  13. document.write("Just Tuesday!")
  14. case 4
  15. document.write("Wednesday!")
  16. case 5
  17. document.write("Thursday...")
  18. case 6
  19. document.write("Finally Friday!")
  20. case else
  21. document.write("Super Saturday!!!!")
  22. end select
  23. </script>
  24.  
  25. <p>本例演示 "select case" 语句。<br />
  26. 您会得到基于日期的不同问候。<br />
  27. 请注意,Sunday=1, Monday=2, Tuesday=3, 以此类推。</p>
  28.  
  29. </body>
  30. </html>