Recently, I developed a sudoku game using JavaScript. The program is designed to only accept numbers from 1-9. However, when I tested it on my Android phone, the program was accepting both letters and digits.
Unfortunately, the code seems to not be working properly on Android devices. Can anyone provide some guidance on how to resolve this issue?
Thank you in advance for your help!
$(document).ready(function() {
$("input").keydown(function (e) {
if ((e.shiftKey || (e.keyCode < 49 || e.keyCode > 57)) && (e.keyCode < 97 || e.keyCode > 105)) {
e.preventDefault();
}
});
});