摘要: 在写javascript脚本时,用某些方法,有时候会碰到"XXX is not a function"之类的报错. 出现这种情况,主要是因为某些方法在低版本浏览器上不支持。比如说"endsWith is not a fucntion".在ES5里面,string对象是没有endsWith 方法的。 阅读全文