Remove leading and trailing whitespace from JavaScript String: code example
Example 1: javascript trim spaces
value = value.trim();
Example 2: javascript whitespace strip
yourvariable.trim()
value = value.trim();
yourvariable.trim()