标签:function return mat ber eva ++ cti lin json
var
str =
‘/Date(1333245600000+0800)/‘
;
function
data_string(str) {
var
d = eval(
‘new ‘
+ str.substr(1, str.length - 2));
var
ar_date = [d.getFullYear(), d.getMonth() + 1, d.getDate()];
for
(
var
i = 0; i < ar_date.length; i ++) ar_date[i] = dFormat(ar_date[i]);
return
ar_date.join(
‘-‘
);
function
dFormat(i) {
return
i < 10 ?
"0"
+ i.toString() : i; }
}
标签:function return mat ber eva ++ cti lin json
原文地址:https://www.cnblogs.com/zhaogaojian/p/9581450.html