Results 1 to 3 of 3

Thread: A questions about if's (Java Script)

  1. #1

    Thread Starter
    Addicted Member Frankie902's Avatar
    Join Date
    Feb 2001
    Location
    Lindenwold, NJ, USA
    Posts
    217
    Is there any kind of "end if" in java script? Is there a way if putting an if into an if? Is there anything like "Cases" from basic, in Java Script?

  2. #2
    Guest
    Yes, you can put IF inside of IF, and you can use Case statement also. Check this http://msdn.microsoft.com/scripting/default.htm

  3. #3
    Fanatic Member Psyrus's Avatar
    Join Date
    Jul 2000
    Location
    NJ
    Posts
    602
    The JavaScript version of the Select Case is:

    switch(n){

    case 1: //n=1

    //Do something

    break;


    case 2: //n=2

    //Do something

    break;


    default:

    //Do something

    break;

    }
    Chris

    VB 6.0 Calendar App Video Gamers Group
    Don't forget to rate people if they helped you.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width