2
Galera use a javascript script to convert everything I type, inside the input to uppercase.
But I have a specific input where I can’t change its content. How can I do this?
Follows the code:
// Converte minusculas em maiusculas
$(document).ready(function() {
$('input').on('input', function() {
// Armazena posição corrente do cursor
var start = this.selectionStart,
end = this.selectionEnd;
this.value = this.value.toUpperCase();
// Restaura posição armazenada anteriormente.
this.setSelectionRange(start, end);
});
});
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
<input type='text' name='video'>
<input type='text' name='video'>
<input type='text' name='video'>
<input type='text' name='video'>
<input type='text' name='nao_alterar'>
But wherever the text appears in upper case?
– Miguel
in all input, except input name='nao_change'
– Hugo Borges