ajax jquery trim data example Example: trim space in jquery var str = " Hello World! "; alert(str.trim());