Form Andy 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>formular</title>
<link href="style.css" rel="stylesheet" type="text/css" />
<script type="text/javascript">
<!--
function MM_validateForm() { //v4.0
if (document.getElementById){
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=document.getElementById(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 e-mail adresse sein.
';
} else if (test!='R') { num = parseFloat(val);
if (isNaN(val)) errors+='- '+nm+' muss eine 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+' muss eine Nummer zwischen '+min+' und '+max+' sein.
';
} } } else if (test.charAt(0) == 'R') errors += '- '+nm+' fehlt.
'; }
} if (errors) alert('Folgende Fehler sind aufgetreten:
'+errors);
document.MM_returnValue = (errors == '');
} }
//-->
</script>
</head>
<body>
<form id="kontaktformular" name="kontaktformular" action=" ">
<label for="vorname">Vorname:</label>
<input id="vorname" name="vorname" type="text">
<label for="nachname">Nachname:</label>
<input id="nachname" name="nachname" type="text">
<label for="mailadresse">E-Mail:</label>
<input id="mailadresse" name="mailadresse" type="text">
<label for="telefon">Telefon:</label>
<input id="telefon" name="telefon" type="text">
<label for="nachricht">Ihre Nachricht:</label>
<textarea id="nachricht" name="nachricht" cols="20" rows="5"></textarea>
<input type="submit" onclick="MM_validateForm('vorname','','R','nachname','','R','mailadresse','','RisEmail','telefon','','RisNum');return document.MM_returnValue" value="Senden">
</form>
</body>
</html>







