November 28, 2013 by SutoCom Solutions Restrict space at first position in textbox using jquery/javascript wonderphp $("input").on("keypress", function(e) { if (e.which === 32 && !this.value.length) e.preventDefault(); }); View original postShare this:Click to share on LinkedIn (Opens in new window)Click to share on Twitter (Opens in new window)Click to share on Blogger (Opens in new window)Click to share on Facebook (Opens in new window)Click to print (Opens in new window)Click to email this to a friend (Opens in new window)Click to share on Reddit (Opens in new window)Like this:Like Loading... Related