setTimeout(function(){
document.getElementById("alarmmsg").innerHTML=msg;
},3000);
上面的代码正在显示消息,但不会关闭屏幕。可能是什么问题呢?
首先显示该消息,然后3秒钟后将其删除。
document.getElementById("alarmmsg").innerHTML = msg;
setTimeout(function(){
document.getElementById("alarmmsg").innerHTML = '';
}, 3000);
本文收集自互联网,转载请注明来源。
如有侵权,请联系 [email protected] 删除。
我来说两句