问题一
关于在JS中需要获取到当前日期并需要格式化的问题
解决方案
function jsonTimeStamp(milliseconds) {
if (milliseconds != "" && milliseconds != null
&& milliseconds != "null") {
var datetime = new Date();
datetime.setTime(milliseconds);
var year = datetime.getFullYear();
var month = datetime.getMonth() + 1 < 10 ? "0"
+ (datetime.getMonth() + 1) : datetime.getMonth() + 1;
var date = datetime.getDate() < 10 ? "0" + datetime.getDate()
: datetime.getDate();
var hour = datetime.getHours() < 10 ? "0" + datetime.getHours()
: datetime.getHours();
var minute = datetime.getMinutes() < 10 ? "0"
+ datetime.getMinutes() : datetime.getMinutes();
var second = datetime.getSeconds() <