Search DaTutorials:  
HOME
VB Script Tutorials
Introduction
Reference
Tutorials

Select case statement

Description:


How to use the select statement.

Code:

<html> <body> <script type="text/vbscript">
function Today()
  d = Date()
  Thetime = Weekday(d)
  select case Thetime
    case 1
  	  document.write("Sunday")
    case 7
  	  document.write("Saturday")
    case 6
  	  document.write("Friday")
    case 5
  	  document.write("Thursday")
    case 4
  	  document.write("Whednesday")
    case 3
  	  document.write("Tuesday")
    case 2
  	  document.write("Monday")
  end select
end function
</script> </head> <body> <p>Today is: <script type="text/vbscript"> Today(); </script> </p> </body> </html>

See working example:


Keywords:

VBScript: function, Date , Weekday, select case

DHTML: document.write


     Xecuter 3 Mod Chip | Proxy Myspace | Remortgages | Loans | Loan
Home     Link To Us     Ad With Us     Contact Us     Tell A Friend     Affiliates     Blog     MsOfficeHelp