//yyyyMMdd 转换为 yyyy-MM-dd function changeDate(str){ return str.replace(/^(d{4})(d{2})(d{2})$/, "$1-$2-$3"); }