str要截取的字符
n截取个数
function jiequ(str,n) {
var strArr = [];
for (var i = 0, l = str.length; i < l / n; i++) {
var a = str.slice(n * i, n * (i + 1));
strArr.push(a);
}
return strArr;
}
转载于:https://www.cnblogs.com/mingjing/p/7017551.html