I created a password to enter a page with a button. I also want to enter the page by giving enter as I enter by clicking the button. can someone help me with that?
<fieldset id="form-ingreso">
<form id="contrasena" name="form" action="INICIO SESION">
<input id="clave" type="password" name=password placeholder="Ingrese la contrasena">
<input class="boton_form" id="btn" type=button value="ENTRAR AL RETIRO">
</form>
</fieldset>
<script>
function ir(){
let c=108;
if(document.form.password.value==c){
window.location="OnePage.html";}
else{
alert('Contrasena incorreta');
}
}
const entrada = document.getElementById('btn')
window.addEventListener('DOMContentLoaded', function(event){
entrada.addEventListener('click', ir)
})
</script>