# 数字千位符
function numberThousands(number, mark = ",") {
return String(number).replace(
/(\d)(?=(\d\d\d)+(?!\d))/g,
"$1" + mark
);
}
← 目录 js获取当月一共多少天 →
function numberThousands(number, mark = ",") {
return String(number).replace(
/(\d)(?=(\d\d\d)+(?!\d))/g,
"$1" + mark
);
}
← 目录 js获取当月一共多少天 →