setInterval(function() { var now = (new Date()).toLocaleString(); $('#current-time').text(now); }); 页面端显示当前时间