Prevent Space in the input field

Html input tag

<input type='text' name="users" />

Simply add this line of code into your HTML pages scripts

$('input').keypress(function( e ) {
    if(e.which === 32) 
        return false;
});
0 0 votes
Article Rating

Do you want to hire us for your Project Work? Then Contact US.
Spread the love
Subscribe
Notify of
guest

0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x