Der Planer: + (HTML) Was ist daran falsch ???

Beitrag lesen

hi,

die klammern  waren falsch!

gruss,
  jan lauken

hier der richtige code:

<head>
    <title> Welcome to ...</title>

<script type="text/javascript">
      function chkFormular(){
        if(document.Formular.M1.value=="Mk1"){
          document.Formular.focus();
          return true;
        }
        if(document.Formular.M2.value=="Mk2"){
          alert("Du hast M2 gewählt. Wähle M1");
          document.Formular.focus();
          return;
        }
        if(document.Formular.M3.value=="Mk3"){
          alert("Du hast M3 gewählt. Wähle M1");
          document.Formular.focus();
          return;
        }
        if(document.Formular.M4.value=="Mk4"){
          alert("Du hast M4 gewählt. Wähle M1");
          document.Formular.focus();
          return;
        }
        if(document.Formular.M5.value=="Mk5"){
          alert("Du hast M5 gewählt. Wähle M1");
          document.Formular.focus();
          return;
        }
        if(document.Formular.M6.value=="Mk6"){
          alert("Du hast M6 gewählt. Wähle M1");
          document.Formular.focus();
          return;
        }
      }

</script>
  </head>

<body>
    <center>
    <form name="Formular" action="Frames.html" onSubmit="return chkFormular()">
      <input type="radio" name="M1" value="Mk1" checked> Möglichkeit 1<br>
      <input type="radio" name="M2" value="Mk2"> Möglichkeit 2<br>
      <input type="radio" name="M3" value="Mk3"> Möglichkeit 3<br>
      <input type="radio" name="M4" value="Mk4"> Möglichkeit 4<br>
      <input type="radio" name="M5" value="Mk5"> Möglichkeit 5<br>
      <input type="radio" name="M6" value="Mk6"> Möglichkeit 6<br>
      <input type="submit" name="VoteButton" value="Senden">
    </form>
    </center>
  </body>