mui.init();
mui.plusReady(function(){
clock();
setInterval('clock()',1000);
function clock(){
var myDate = new Date();//获取系统当前时间
var hour = myDate.getHours(); //获取当前小时数(0-23)
hour = hour<10?'0'+hour:hour;
var minute = myDate.getMinutes(); //获取当前分钟数(0-59)
minute = minute<10?'0'+minute:minute;
var seconds = myDate.getSeconds(); //获取当前秒数(0-59)
seconds = seconds<10?'0'+seconds:seconds;
document.getElementById('time').innerHTML= hour+':'+minute+':'+seconds;
}
});
1***@qq.com
- 发布:2018-08-10 15:15
- 更新:2020-04-13 11:25
- 阅读:1481
setInterval在mui.plusReady里面一直报错找不到计时函数
分类:MUI
1 个回复
1***@qq.com - poor-bird
请问解决了么,我这里也遇到类似的情况