开发者

Converting select list to uppercase

开发者 https://www.devze.com 2023-02-10 03:30 出处:网络
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

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消