Javascript – How can I prevent user typing certain letters?
function NumberKey(event) { let charCode = event.which || event.keyCode; console.log(event.keyCode) if ((charCode >= 48 && charCode <= 57) || // Number (0-9) (charCode >= 96 && charCode <= 105) || // Numberpad (0-9) (charCode >=112 && charCode <= 123)|| //…