<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
 "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
   <title>JavaScript: Verzweigungen</title>

   <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">

   <meta name="description"
      content="&Uuml;bung JavaScript. Verzweigungen">
   <meta name="keywords" content="HTML, JavaScript">
   <meta name="author" content="Roland Unger">
</head>

<body>

<h2>&Uuml;bung JavaScript</h2>
<h3>Verzweigungen</h3>

<script language="JavaScript" type="text/javascript">
<!--

var a=3;
document.write("a: ", a, "<br>&nbsp;<br>");

if (a<3) {
   document.write("Ergebnis ist gut oder sehr gut") }
else {
   document.write("Ergebnis ist nicht gut") };

document.write("<br>&nbsp;<br>");

switch (a) {
   case 1:  document.write("Ergebnis ist sehr gut");
            break;
   case 2:  document.write("Ergebnis ist gut");
            break;
   case 3:  document.write("Ergebnis ist befriedigend");
            break;
   case 4:  document.write("Ergebnis ist ausreichend");
            break;
   case 5:  document.write("Ergebnis ist ungen&uuml;gend");
            break;
   default: document.write("Ergebnis ist keine g&uuml;ltige Zensur");
}

// -->
</script>

</body>
</html>