mirror of
https://github.com/simple-login/app.git
synced 2024-11-18 06:31:27 +08:00
Activate key on enter
This commit is contained in:
parent
d91fbb563a
commit
0a59dd5638
1 changed files with 7 additions and 0 deletions
|
@ -56,6 +56,13 @@
|
|||
}
|
||||
|
||||
$("#btnRegisterKey").click(registerKey);
|
||||
|
||||
document.getElementById("key_name").addEventListener("keydown", event => {
|
||||
if (event.keyCode === 13) {
|
||||
event.preventDefault();
|
||||
document.getElementById("btnRegisterKey").click();
|
||||
}
|
||||
});
|
||||
</script>
|
||||
|
||||
</div>
|
||||
|
|
Loading…
Reference in a new issue