Monday, June 16, 2008

Uppercase a field value through javascript

To uppercase a field value through javascript:

<input type="text" name="personName" value="" onblur="javascript:toUpper(this);" />

function toUpper(cur){
cur.value=cur.value.toUpperCase();
}

No comments: