Breaking News

Wednesday, July 4, 2012

Ex11: Select Case statement in VBScript


<!DOCTYPE html>
<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>

No comments:

Post a Comment

Designed By Published.. Blogger Templates