2
如何按時設置格式? 它顯示16:9:2 它應該顯示16點09分02秒以hh格式化的時間:mm:ss
我的代碼:
setInterval(function _timer() {
var time = new Date();
var h = time.getHours();
var m = time.getMinutes();
var s = time.getSeconds();
var fullTime = h + ":" + m + ":" + s;
fullTime.format("hh-MM-ss");// this is not working
$("#time").html(fullTime);
1000
});