Gampang. Gini nih caranya:
<body>
Enter your username: <input type="text" id="myusername" />
Enter your password: <input type="password" id="mypassword" />
<input type="button" value="submit" onclick="check()"/>
<script>
function check(){
theusername = document.getElementById("myusername").value
thepassword = document.getElementById("mypassword").value
if (theusername == "Anggota")
{
if (thepassword == "PasswordAnggota")
{
alert("Your account is verified");
document.write("<!DOCTYPE html><head><title>Welcome to mysite</title></head><body><div id='mypictures' style='background-image: '>Hello World!</body>")
}
alert("Your password is wrong!");
}
}
</script>
</body>
No comments:
Post a Comment