Converting select list to uppercase
Is there any way to force the input of a select list to be uppercase as you type?
I've tried using the sty开发者_如何学运维le attribute text-transform:uppercase
, but it doesn't seem to do anything.
I think this might work for you -
Add this as the javascript event in your textbox/multiline textbox html control -
onkeyup="this.value=this.value.toUpperCase()"
You can use javascript event "OnKeyUp" , check the value there, and assign the value again after converting it to upper case. This will ensure it stays in uppercase when you type .
Simply have a look : http://jsfiddle.net/saranghdave/gBXj6/
Thanking you.
精彩评论