ie8 not support trim.

If user use IE8 or below, user get the error message. 
''Object doesn't support property or method 'trim'"
I replaced trim to replace to support IE8.