fix : submit on enter
This commit is contained in:
parent
83e6908475
commit
cd7972d826
2 changed files with 8 additions and 1 deletions
|
|
@ -27,6 +27,8 @@ session_start();
|
|||
<div class="formulaire">
|
||||
<input class="champ" id="username-input" type="text" name="username" placeholder="Nom d'utilisateur" required>
|
||||
<input class="champ" id="password-input" type="password" name="password" placeholder="Mot de passe" required>
|
||||
|
||||
<input type="submit" id="submit-input" hidden />
|
||||
<button class="submit-button color-red-tr" onclick="connection()">Se connecter</button>
|
||||
</div>
|
||||
|
||||
|
|
|
|||
|
|
@ -27,4 +27,9 @@ function connection(){
|
|||
.catch(error => {
|
||||
console.error('Error:', error);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
document.getElementById("submit-input").addEventListener("submit",(e)=>{
|
||||
connection();
|
||||
});
|
||||
Loading…
Reference in a new issue