Descrizione
Semplice login...
Codice
<html>
<head>
<script language="JavaScript">
function Login(form) {
var user = form.user.value;
var passw = form.passw.value;
if (user=="user" && passw=="pass") {
var htsite = "liv2.html";
window.location = htsite;}
else if (user!="user" && passw=="pass") {
alert("Username errato!");
}
else if (user=="user" && passw!="pass") {
alert("Password errata!");
}
else
{
alert("Non hai inserito dei dati validi!");
}
}
</script>
</head>
<body bgcolor="#000000">
<form name=login>
<p align="center"><font color="#00FF00">Username:</font>
<input type=text name=user size=20>
<br>
<br>
<font color="#00FF00">Password:</font>
<input type=password name=passw size=20>
</p>
<p align="center">
<input type=button value="login" onClick="Login(this.form)" name="button">
</p>
</form>
</body>
</html>
0 commenti:
Posta un commento