JS获取当前时间
setInterval("getTime();", 1000); function getTime() { //document.getElementById('linkweb').innerHTML = new Date().toLocaleString() + ' 星期' + '日一二三四五六'.charAt(new Date().getDay()); //document.getElementById('dvtime').innerHTML = new Date().toLocaleDateString() + ' 星期' + '日一二三四五六'.charAt(new Date().getDay()); var d = new Date(); d = d.getHours() + ":" + d.getMinutes() + ":" + d.getSeconds(); $('#dvtime').html(d); } -------------------------------------------------------------------------------------- <div class="positionBt"> <div class="bo_t" id="dvtime"></div> <div/>