BOM对象

BOM对象:浏览器对象模型
document: html文档
windows: 页面窗口
loaction: 网址路径url
history: 历史记录
navigator: 当前浏览器的属性,包括名称、版本号
screen: 当前浏览者屏幕对象

 

设置定时器:

setInterval(function(),1000)

取消定时器:

clearInterval  

替换:
replace('a','b') 将a替换为b

通过定时器设置,调用方法可通过点击按钮,控制开关时钟运行。

function stopTime(){
clearInterval(t);
}
function startTime(){
t=window.setInterval("showtime()",1000);
}

posted on 2019-08-14 10:19  流光若影  阅读(88)  评论(0编辑  收藏  举报