Search
Sponsors

Posts Tagged ‘toUpperCase’

Change case in a text box

Wednesday, March 4th, 2009

2 examples handy for when a user enters data on a form

<div align=”center”>
<form name=lowerexample”>
<input type=”text” name=”caps” size=”40″
value=”" onChange=”javascript:this.value=this.value.toLowerCase();”>
<br>
<input type=”button” value=”convert”>
</form>
</div>
<div align=”center”>
<form name=”upperexample”>
<input type=”text” name=”caps” size=”40″
value=”" onChange=”javascript:this.value=this.value.toUpperCase();”>
<br>
<input type=”button” value=”convert”>
</form>
</div>

Translate