关于ie9以下不支持trim()方法 可以在自己封装的框架中加入如下。或直接调用也行。 if(!String.prototype.trim) { String.prototype.trim = function() { return this.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, ”); //\uFEFF为es5新增的空白符,\XA0是不间断…
js中 <!DOCTYPE html> <html lang=”zh”> <head> <meta charset=”UTF-8″ /> <meta name=”viewport” content=”width=device-width, initial-scale=1.0″ /> <meta http-equiv=”…