startWidth、endWidth 兼容

遇到IE不兼容endsWidth方法,網上找了一下,在此記錄。測試 String.prototype.startWith=function(str){ var reg=new RegExp("^"+str); return reg.test(this); } //測試ok,直接使用str.endWith("abc")方式調用便可 String.prototype.en
相關文章
相關標籤/搜索