This blog is my memo for collecting IT stuffs. And some my free softwares. Please use google friend connect to post comments.
Javascript doesn't have trim function. but you can use replace() function instead in a way something like this.
target = target.replace(/(^\s+)|(\s+$)/g, "");