I need to create a simple internal login system to apply to a blog. I can not make my code work at all, and I need help.
This is the Code:
<script language="JavaScript">
function Login(){
var done=0;
var usuario=document.login-inputs.usuario.value;
usuario=usuario.toLowerCase();
var senha=document.login-inputs.senha.value;
seha=senha.toLowerCase();
if (usuario=="admin" && senha=="admin") {
window.location="/p/admin.html"; done=1;
}
if (done==0) { alert("Dados incorretos, tente novamente"); }
}
</script>
<div id="all">
<div id="login-box">
<div id="login-header">
Faça login no sistema
</div>
<div id="login-inputs">
<input type="text" placeholder="Nome de usuário" name=usuario>
<br />
<input type="password" placeholder="Senha" name=senha>
</div>
<div id="enviar">
<input type="button" onclick="Login()" class="botao" value=Login>
<a href="#">Esqueceu a sua senha?</a>
</div>
</div>
</div>
Does anyone set the script please? (I can not modify the HTML)