W3School TIY
(请在下面的文本框中编辑您的代码,然后单击此按钮测试结果。)
编辑您的代码:
<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>
查看结果: