Simple way to trim whitespace for the beginning of text using JavaScript.
var keywordvalue = " Hi ";
var keywordvalue = (keywordvalue.trimLeft());
Output = “Hi ”
To replace all whitespace using Javascript use this next script.
http://aq.gthex.co.uk:10000/javascript/trim-whitespace-javascript/












