Thursday, November 20, 2008

Javascript: Making Initial Letter Capital for text box

Following script will work to make the initial letter in your text box automatically.

I have placed this in onKeyup event, you can use it according to your own requirements.

onkeyup=
"this.value=this.value.substring(0,1).toUpperCase()
+this.value.substring(1,this.value.length)"


Here is the example:

No comments: