我有这个函数:
function fun_voting_started(){
var now = new Date();
var now_date = now.getDate();
var now_month = now.getMonth(); now_month++;
var now_year = now.getFullYear();
var now_hours = now.getHours();
var now_min = now.getMinutes();
var now_sec = now.getSeconds();
var voting_started = now_year + "-" + now_month + "-" + now_date + " " + now_hours + ":" + now_min + ":" + now_sec;
return voting_started;
}
这个函数从计算机加载日期,但有时用户的日期可能与当前日期不同。如何从互联网上获取当前日期?