1
The script below turns all characters uppercase into an input.
<input type='text' name='meuInput'>
<script>
$("input").bind('keyup', function (e) {
if (e.which >= 97 && e.which <= 122) {
var newKey = e.which - 32;
e.keyCode = newKey;
e.charCode = newKey;
}
$(this).val(($(this).val()).toUpperCase());
});
</script>
The desktop works normally, but in mobile it duplicates the text. But in mobile when:
Digit: E
Sai: EE
Digit: And it is
Sai: And he is
Digit: And it’s the
Sai is ae is ae
Is there another way or how to fix it?
You can’t solve this issue with CSS?
– Leandro Angelo
I don’t know how to do it in CSS. And if the user type in lower case should turn in upper case.
– ElvisP