Answers for "how to restrict the user to input english language"

0

how to restrict the user to input english language

$(document).on("keypress", "input[type='text'] function (event) {
        return suppressNonEng(event);
    });

function suppressNonEng(EventKey) {
    var key = EventKey.which || EventKey.keyCode;
    if (key > 128) { sefAlert("Only English is allowed"); return false; }
    else { return true; }
}
Posted by: Guest on November-26-2020

Code answers related to "how to restrict the user to input english language"

Browse Popular Code Answers by Language