function draw() {
var now =new Date();
var hour =now.getHours();
var minute =now.getMinutes();
var second =now.getSeconds();
drawHour(hour,minute);
drawMinute(minute);
drawSecond(second);
}
setInterval(draw,1000);
你没有调用画背景的函数
drawHour(hour,minute); drawMinute(minute); drawSecond(second);
这三个方法的代码可以贴下吗?
用浏览器调试一下,看看是否报错误了,可能哪括号没对齐或者其他语法错误