When I log in, I don't press the button, but when I press Enter, I can't log in, and only JSON Response appears on the screen.
$("#password").keyup(function(event) {
if(event.keyCode == 13) {
$("#btn_login").trigger("click");
}
});
$("#btn_login").click(function() {
...
}
It's been a while.
I changed the keyup to keydown, so it's done.
I was so busy at the time that I couldn't answer
Thank you for leaving comments.
$("#password").keydown(function(event) {
if(event.keyCode == 13) {
$("#btn_login").trigger("click");
}
});
© 2024 OneMinuteCode. All rights reserved.