Thursday, February 23, 2012

Case implementation in VBScript


Case in VB script program.(Only IE)

 When form will load into browser window the onload event will call greeting() function .




<html>
<head runat="server">
    <title>Untitled Page</title>
    <script type="text/vbscript">
Function greeting()

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

End Function
</script>
   
</head>
<body onload="greeting()">
    <form id="form1" runat="server">
    <div>


  
    </div>
    </form>
</body>
</html>

No comments:

Post a Comment