用jquery的trim()方法,$.trim(str)就能夠了。jquery
https://blog.csdn.net/jcx5083761/article/details/14518109.net