checktext_1
Texteingabefelder prüfen (einfache Version)
- checkform.js
function CheckForm()
{
var Form = document.Login;
if( Form.email.value == "")
{
alert( "Bitte geben Sie Ihre E-Mail-Adresse ein." );
Form.email.focus();
return false;
}
if( Form.password.value == "")
{
alert( "Bitte geben Sie Ihr Passwort ein." );
Form.password.focus();
return false;
}
}
- login_form.html
<form id="Login" method="post" onsubmit="return CheckForm();">
<table>
<tr>
<th>E-Mail-Adresse:</th>
<td><input type="email" name="Benutzername" /></td>
</tr>
<tr>
<th>Passwort:</th>
<td><input type="password" name="Passwort" /></td>
</tr>
<tr>
<th> </th>
<td><input type="submit" name="submit" value="Login" /></td>
</tr>
</table>
</form>
checktext_1.txt · Zuletzt geändert: 2015/12/19 00:00 (Externe Bearbeitung)