Here is an example of my form http://jsfiddle.net/GT7fY/
How to convert all text to uppercase when a user writes to a field?
You can use keyup() and toUpperCase()
keyup()
toUpperCase()
$('input').keyup(function(){ this.value = this.value.toUpperCase(); });
fiddle here http://jsfiddle.net/GT7fY/2/
Try the following:
style input input{text-transform:uppercase;} and onBlur make uppercase <input onBlur="$(this).val(this.value.toUpperCase());">
What is it:)
I would just convert it to uppercase into a send event.
$("#verify input").val(function(i,val){ return val.toUpperCase(); });
A capital requirement can simply be hidden from the user.
$('form#verify').on('keyup', 'input', function(event) { $(this).val($(this).val().toUpperCase()); });
Paste This at the bottom:
$(document).ready(function(e){ $('input[type="text"]').on('keyup', function(){ $(this).val(this.value.toUpperCase()); }); });
$(":input").keyup(function() { $(this).val($(this).val().toUpperCase()); });
all yours.
Source: https://habr.com/ru/post/909101/More articles:Rendering a jade template with a layout (no express) - node.jsIs there a bash command to convert an entire directory to HAML from HTML? - bashHello world uses 4 threads in .NET4.0, but 3 in .NET2.0 - multithreadingHow to pass variables between Ruby classes? - variablesC built-in functions and "undefined external" error - cAngularjs click and display from a list - javascriptAndroid and Twitter4j: Handling OAuth with a Webview widget? - androidWhat is the MessageDigest update method and what is the BASE64Encoder? - javaWhy does MessageDigest return different responses for the same line? - javaHow to create an Outlook meeting request with an alternate sender / organizer? - pythonAll Articles