Html部分
<sapn class="time-info" id="time-info">
JS部分
function time(){
var now=new Date(),
time=now.toLocaleTimeString();
return time;
}
setInterval(function () {
$("#time-info").text(time)
},1000)
Html部分
<sapn class="time-info" id="time-info">
JS部分
function time(){
var now=new Date(),
time=now.toLocaleTimeString();
return time;
}
setInterval(function () {
$("#time-info").text(time)
},1000)