当输入 src.trim();时,ie浏览器不支持此属性和方法,解决方法:

 

//ie兼容trim方法
if(!String.prototype.trim) {
String.prototype.trim = function () {
return this.replace(/^\s+|\s+$/g,'');
};
}

src=src.trim();

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-08-19
  • 2022-12-23
  • 2022-12-23
  • 2021-10-11
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-10-27
  • 2021-12-18
  • 2022-01-23
  • 2021-06-03
  • 2021-07-13
相关资源
相似解决方案