Can anyone help me for this problem ?.. I have a Log-in form and i want to validate the username and password to log-in but the account is default. This is my Code
<html> <head> <title></title> <script>
function LogIn(){
user = document.getElementById("User").value;
pass = document.getElementById("Pass").value;
use = "1";
if(user == "1"){
alert("Welcome Admin");
return true;
}else{
alert("Wrong username of password");
return false;
}
}
</script>
</head>
<body>
<div id="div1">
<fieldset id="field"> <form action="Menu.html" method="get">
<Us id="User">Username:</Us><br><br>
<input type="text" id="Username" placeholder="Username"><br><br>
<Pas id="Pass">Password:</Pas><br><br>
<input type="Password" id="Password" placeholder="Password"><br><br>
<input type="submit" id="Submit" value="LogIn" onClick="LogIn()" >
</form>
</fieldset>
</div>
<div id="div2">
<Log id="LogIn">Log In </Log> </div>
</body>
</html>