function returnYear(month) { if(month<=1*12) return "第二年"; if(month<=2*12) return "第二年,第三年"; if(month<=3*12) return "第二年,第三年,第四年"; if(month<=4*12) return "第二年,第三年,第四年,第五年"; if(month<=5*12) return "第二年,第三年,第四年,第五年,第六年"; if(month<=6*12) return "第二年,第三年,第四年,第五年,第六年,第七年"; if(month<=7*12) return "第二年,第三年,第四年,第五年,第六年,第七年,第八年"; if(month<=8*12) return "第二年,第三年,第四年,第五年,第六年,第七年,第八年,第九年"; if(month<=9*12) return "第二年,第三年,第四年,第五年,第六年,第七年,第八年,第九年,第十年"; if(month<=10*12) return "第二年,第三年,第四年,第五年,第六年,第七年,第八年,第九年,第十年,第十一年"; if(month<=11*12) return "第二年,第三年,第四年,第五年,第六年,第七年,第八年,第九年,第十年,第十一年,第十二年"; }
1 回答
倚天杖
TA贡献1828条经验 获得超3个赞
var txt = ['第二年', '第三年', '第四年', ...];
return txt.slice(0, Math.ceil(month / 12)).join(',')
添加回答
举报
0/150
提交
取消
