代码示例:(标识:vbst_selectcase)
<html>

<body>
<script type="text/vbscript">
d=weekday(date)

select case d
  case 1
    document.write("Sleepy Sunday")
  case 2
    document.write("Monday again!")
  case 3
    document.write("Just Tuesday!")
  case 4
    document.write("Wednesday!")
  case 5
    document.write("Thursday...")
  case 6
    document.write("Finally Friday!")
  case else
    document.write("Super Saturday!!!!")
end select
</script>

<p>本例演示 "select case" 语句。<br />
您会得到基于日期的不同问候。<br />
请注意,Sunday=1, Monday=2, Tuesday=3, 以此类推。</p>

</body>
</html>
运行结果: