首页 > 代码库 > /Date(1410019200000+0800)/如何转换为date对象

/Date(1410019200000+0800)/如何转换为date对象

<script type="text/javascript">
var s = ‘/Date(1410019200000+0800)/ ‘;

s.replace(/Date\([\d+]+\)/, function (a) { eval(‘d = new ‘ + a) });

alert(d.toLocaleString());


</script>

 

输出的结果为:2014-9-7 00:00:00

/Date(1410019200000+0800)/如何转换为date对象