本文共 343 字,大约阅读时间需要 1 分钟。
//字符串转时间格式 function getDatechange(strDate) { var date = eval('new Date(' + strDate.replace(/\d+(?=-[^-]+$)/, function (a) { return parseInt(a, 10) - 1; }).match(/\d+/g) + ')'); return date; } function getDatechange1(d){ var date = new Date(d); return date; }
转载地址:http://ngztb.baihongyu.com/