A
A
Andrey Lebedev2016-02-03 15:40:40
JavaScript
Andrey Lebedev, 2016-02-03 15:40:40

Prohibition of Cyrillic input - it works on the computer, but not on the phone in WebView, how so?

Made input validation with Cyrillic prohibition. In the browser it works - fine, in the webView - it doesn't work.

document.getElementById("name").onkeypress= function(event){
  var ew = event.which;
    if(ew < 49)
        return true;
  if(65 <= ew && ew <= 90)
        return true;
    if(97 <= ew && ew <= 122)
        return true;
  if(ew == 32)
    return true;
    return false;
    };

It seems nothing supernatural, but it does not work in webView. Javascript in webView is enabled. Why can this be so?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question