js中substr与substring的区别

substr(start[,length])表示从start位置开始取length个字符串

substring(start,end)表示从start,到end之间的字符串,包括start位置的字符但是不包括end位置的字符