Tryit Editor v1.4

<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>This example demonstrates the "select case" statement.<br /> You will receive a different greeting based on what day it is.<br /> Note that Sunday=1, Monday=2, Tuesday=3, etc.</p> </body> </html> | Your Result:
Edit the code above and click to see the result. | W3Schools.com - Try it yourself