This is a quite simple piece of HTML with a bit of JavaScript integrated. I did what I could from what I know, but I don't think I used the correct document tags. Its either that or the page needs a way of updating, which I don't know how to do. Please help.
<!DOCTYPE html>
<html>
<body>
<form action="">
User name:<br>
<input type="text" name="userid">
<br>
User password:<br>
<input type="password" name="psw">
</form>
<p>The characters in a password field are masked (shown as asterisks or circles).</p>
<p id="enter"></p>
<script>
function access(username, password) {
if (username == "bobby") {
if (password == "qwertyasd123") {
document.getElementById(enter).innerHTML = "You may pass";
}
}
}
access(document.getElementsByName("userid").innerHTML,
document.getElementsByName("userid").innerHTML)
</script>
</body>
</html>
accessfunction on some eventnameyourformand usedocument.forms[formname].userid.value, (and.psw.value), and you'll also want to keep the username and password secret - use a server side script (Bash, Perl, PHP, Python, JavaScript) or program (C, Java, C#,...).