Thursday, November 12, 2009

Regular Expression To Check Input With no space using JavaScript

            function validateContent(evt)
             var pattern =     /^\w[a-zA-Z@#0-9.]*$/;
                 if( == -1)
                    alert('Space not Allowed');
                    return false;
        <input type='text' onkeyup='return validateContent(this);' />

No comments:

Creative Commons License
Disclaimers:We have tried hard to provide accurate information, as a user, you agree that you bear sole responsibility for your own decisions to use any programs, documents, source code, tips, articles or any other information provided on this Blog.