点击运行
JavaScript String.trim()
IE 8 不支持 String.trim()。您可搭配正则表达式使用 replace() 方法代替:
运行结果