Membuat Login Pada Web Design
Berikut Code Yang harus di isi untuk bisa mencoba login
<!DOCTYPE html>
<html>
<head>
<script>
function Login(){
var username=document.login.username.value;
username=username.toLowerCase();
var password=document.login.password.value;
password=password.toLowerCase();
if (username=="imam" && password=="ganteng"){
alert ("BERHASIL LOGIN GUYS");
window.location.href-"index.html";
}else {
alert ("Maaf Anda Jelek")
}
}
</script>
</head>
<body style="background-color:#00253d;color:grey;">
<form name="login">
<table width="255" cellpadding="4" align="center">
<tr height="300"> </tr>
<tr><td>Username</td><td>
<input type="text" name="username"></td></tr>
<tr> <td>password</td>
<td> <input type="password" name="password"></td></tr>
<tr><td colspan="2" align="right">
<input type="button" value="Login" onClick="Login()"></td></tr>
</table>
</form>
</body>
</html>
0 komentar:
Posting Komentar