js时间显示样式源代码
成都创新互联主营吉州网站建设的网络公司,主营网站建设方案,成都app软件开发,吉州h5小程序定制开发搭建,吉州网站营销推广欢迎吉州等地区企业咨询
//这里面设置相关样式,注意不要错删标点哦
function style() {
document
.write('
}
//这里主要是控制时间
var timerID = null;
var timerRunning = false;
function stopclock() {
if (timerRunning)
clearTimeout(timerID);
timerRunning = false;
}
function showtime() {
var now = new Date();
var hours = now.getHours();
var minutes = now.getMinutes();
var seconds = now.getSeconds();
var timevalue = " " + ((hours > 12) ? hours - 12 : hours);
timevalue += ((minutes < 10) ? ":0" : ":") + minutes;
timevalue += ((seconds < 10) ? ":0" : ":") + seconds;
timevalue += (hours >= 12) ? " PM" : " AM";
document.clock.face.value = timevalue;
timerID = setTimeout("showtime()", 1000);
timerRunning = true;
}
function startclock() {
stopclock();
showtime();
}
网站题目:js时间显示样式源代码
分享网址:http://ybzwz.com/article/gsihsj.html