Restrict input to alphanumeric and uppercase





11
Date Submitted Thu. Aug. 10th, 2006 2:32 AM
Revision 1 of 1
Syntax Master sundaramkumar
Tags HTML | JavaScript
Comments 1 comments
Restrict input to alphanumeric and uppercase


<input type="text" onkeydown="f(this)" onkeyup="f(this)" onblur="f(this)" onclick="f(this)" />

 


function f(o){
        o.value=o.value.toUpperCase().replace(/([^0-9A-Z])/g,"");
}
 

Comments

Comments Paste
Sun. Oct. 29th, 2006 12:11 PM    Scripter SCoon

Voting