JSON中的Date类型的读取

 var emp = eval("(" + xmu.responseText + ")");
   $("Empno").value = emp.empno;
   $("Ename").value = emp.ename;
   $("Job").value = emp.job;
   var hirdate = new Date(emp.hiredate.time);
   //此时包括第十个数字
   var dates = hirdate.toLocaleString().substring(0, 10);
   $("Hiredate").value = dates;
   $("Mgr").value = emp.mgr;
   $("Sal").value = emp.sal;
   $("Comm").value = emp.comm;
   $("Deptno").value = emp.deptno;

 

你可能感兴趣的:(json)