C#后台unxi时间戳转换为前台JS时间的方法

后台返回的时间是一个格式为 /Date(1530153274362)/ 的unxi时间戳
前台转换代码:
var matchResult = data.match(/(d+)/);
if (matchResult != null && matchResult.index > 0) {
curTime = new Date(parseInt(matchResult[0]));
}
转换后的curTime就是前台的时间格式

原文地址:https://www.cnblogs.com/llcdbk/p/9237466.html