Code highlighting produced by Actipro CodeHighlighter (freeware)
http://www.CodeHighlighter.com/
--> //轉換json格式的日期(如:{ServerDatetime:"\/Date(1278930470649)\/"})爲Javascript的日期對象
function ConvertJSONDateToJSDateObject(JSONDateString) {
var date = new Date(parseInt(JSONDateString.replace("/Date(", "").replace(")/", ""), 10));
return date;
}
function renderTime(data){
var da = eval('new ' + data.replace('/','','g').replace('/','','g'));
return da.getFullYear()+"-"+ da.getMonth()+"-" +da.getDay()+" " +da.getHours()+":"+da.getMinutes() +":"+ da.getSeconds() ;
}