The switch Statement : Switch : Language Basics JAVASCRIPT DHTML TUTORIALS


JAVASCRIPT DHTML TUTORIALS » Language Basics » Switch »

 

The switch Statement



<html>
<head>
  <title>The switch Statement</title>
</head>
<body>
  <script language="JavaScript1.2" type="text/javascript">
  <!--
    var request = "Name";
    switch(request){
      case "Logo" :
        document.write('<img src="logo.gif" alt="Logo">');
        document.write("<br>");
        break;
      case "Name" :        
        document.write("Software Inc.");
        document.write("<br>");
        break;
      case "Products" :
        document.write("MyEditor");
        document.write("<br>");
        break;
      default :
        document.write("www.navioo.com");
        break;
    }
  //-->
  </script>
</body>
</html>

           
       



-

Leave a Comment / Note


 
Verification is used to prevent unwanted posts (spam). .

Follow Navioo On Twitter

JAVASCRIPT DHTML TUTORIALS

 Navioo Language Basics
» Switch