Zum Inhalt . Zur Suche .

Formular HTML

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd ">
<html xmlns="http://www.w3.org/1999/xhtml ">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
 <title>Bestellformular</title>


<script language="JavaScript" type="text/JavaScript">
<!--
function MM_findObj(n, d) { //v4.01
  var p, i, x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
  d=parent.frames[n.substring(p+1)].document; n=n.substring(0, p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n, d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_validateForm() { //v4.0
  var i, p, q, nm, test, num, min, max, errors='', args=MM_validateForm.arguments;
  for (i=0; i<(args.length-2); i+=3) { test=args[i+2]; val=MM_findObj(args[i]);
  if (val) { nm=val.name; if ((val=val.value)!="") {
  if (test.indexOf('isEmail')!=-1) { p=val.indexOf('@' );
  if (p<1 || p==(val.length-1)) errors+='- '+nm+' muss eine gültige E-Mail Adresse sein. ';
  } else if (test!='R') { num = parseFloat(val);
  if (isNaN(val)) errors+='- '+nm+' muss ein Nummer sein. ';
  if (test.indexOf('inRange') != -1) { p=test.indexOf(':');
  min=test.substring(8, p); max=test.substring(p+1);
  if (num<min || max<num) errors+='- '+nm+' must contain a number between '+min+' and '+max+'. ';
  } } } else if (test.charAt(0) == 'R') errors += '- '+nm+' muss ausgefüllt sein. '; }
  } if (errors) alert('Folgende Fehler sind aufgetreten: '+errors);
  document.MM_returnValue = (errors == '');
}
//-->
</script>
</head>

<body>
<h1>Bestellformular</h1>

<form name="form1" method="post" action="">

<select name="anrede" size="1" id="anrede">
  <option value="herr">Herr</option>
  <option value="frau">Frau</option>
</select>
<br />
<br />

<fieldset>
  <legend>Personalien</legend>
<label for="vorname">Vorname</label>
<input name="Vorname" type="text" id="vorname"  size="30" maxlength="30" tabindex="1" /><br />
<label for="name">Name</label>
<input name="Name" type="text" id="name" size="30" maxlength="30" tabindex="2" /><br />
<label for="telefon">Telefonnummer</label>
<input name="Telefon" type="text" id="telefon" size="30" maxlength="30" tabindex="3" /><br />
<label for="mail">E-Mail</label>
<input name="Mail" type="text" id="mail" size="30" maxlength="30" tabindex="4" /><br />
</fieldset><br />


<fieldset>
<legend>Ich bestelle</legend>
<input name="Kaese" type="text" id="kaese" size="5" maxlength="3" tabindex="5" />
<label for="kaese">Stück Käse</label><br />
<input name="Joghurt" type="text" id="joghurt" size="5" maxlength="3" tabindex="6" />
<label for="joghurt">Glas Joghurt</label><br />
<input name="Quark" type="text" id="quark" size="5" maxlength="3" tabindex="7" />
<label for="quark">Glas Quark</label><br />
<input name="Butter" type="text" id="butter" size="5" maxlength="3" tabindex="8" />
<label for="butter">Packungen Butter </label><br />
</fieldset><br />

<fieldset>
  <legend>Ich bezahle</legend>
 <input type="radio" name="zahlung" value="rechnung" id="zahl_rech" tabindex="9" />
<label for="zahl_rech">Mit Rechnung</label><br />
<input type="radio" name="zahlung" value="ueberweisung" id="zahl_ueber" tabindex="10" />
<label for="zahl_ueber">Mittels Überweisung </label><br />
<input type="radio" name="zahlung" value="kreditkarte" id="zahl_karte" tabindex="11" />
<label for="zahl_karte">mit Kreditkarte</label><br />
</fieldset><br />

<fieldset>
<legend>Ich wünsche zusätzlich </legend>
<input name="zusatz" type="checkbox" id="zus_gesch" value="geschenk" tabindex="12" />
<label for="zus_gesch">Geschenkverpackung</label><br />
<input name="zusatz" type="checkbox" id="zus_rezept" value="rezept" tabindex="13" />
<label for="zus_rezept">Rezeptbuch</label><br />
<input name="zusatz" type="checkbox" id="zus_brosch" value="broschuere" tabindex="14" />
<label for="zus_brosch">Broschüre</label><br />
</fieldset><br />

<input name="Submit" type="submit" onclick="MM_validateForm('name', '', 'R', 'telefon', '', 'RisNum', 'mail', '', 'RisEmail');return document.MM_returnValue" value="Senden" tabindex="15" />
<input name="reset" type="reset" id="reset" value="Zurücksetzen" />
</form>

</body>

</html>

Google-Suche


Google -Ads