Here convert lowercase chars to uppercase as the user types using javascript.
type text on HTML code :
<textarea id="textarea"></textarea>
<br>
<input type="text" id="input"></input>
type text on Java Script :
type text on HTML code :
<textarea id="textarea"></textarea>
<br>
<input type="text" id="input"></input>
type text on Java Script :
$("#input , #textarea").on('input', function(evt) { var input = $(this); var start = input[0].selectionStart; $(this).val(function (_, val) { return val.toUpperCase(); }); input[0].selectionStart = input[0].selectionEnd = start; });
Link sample Click DEMO APPLICATION
0 komentar
Berkomentarlah dengan Bahasa yang Relevan dan Sopan.. #okemasbro! ^_^