jQuery provides a function that removes extra spaces from a string
Edit code and click me
Your Result
(Some examples do not work in Google Chrome):
Trim
Write a string with blanks and click
*
Result here
*
Edit the code above and click to see the result
www.xhtml.co.il
- Try it yourself