I want to convert lowercase chars to uppercase as the user types using javascript. Any suggestions are welcome.
I have tried the following:
$(\"#text
function changeToUpperCase(event,obj) {
charValue = (document.all) ? event.keyCode : event.which;
if (charValue!="8" && charValue!="0" && charValue != "27"){
obj.value += String.fromCharCode(charValue).toUpperCase();
return false;
}else{
return true;
}
}
Edit:
The most simplest way is by using css:
#txtId {text-transform:uppercase}