Enter text in Upper Case, Press Tab or click outside the text box


Return to tutorial on text box onblur event

JavaScript

<script type="text/javascript"> 
function change_case()
{
document.form1.type.value=document.form1.type.value.toLowerCase();
}
</script>

HTML

<body    onLoad="form1.type.focus();">
<form name=form1 method=post action=''>
<input type=text name=type value='Enter USER ID' onBlur="change_case();"> 
<input type=submit value=Submit> </form>