点击运行
JavaScript String.trim()
IE 8 不支持 String.trim()。您可以使用 replace 方案把 trim 函数添加到 JavaScript String.prototype:
运行结果