BOM基础
BOM基礎(chǔ)
打開(kāi)窗口 window.open('about:blank','_blank') 第一個(gè)參數(shù)是打開(kāi)哪一個(gè)口,第二個(gè)參數(shù)是在哪里打開(kāi)窗口。
關(guān)閉窗口 window.close()
window.location() 可以讀取,也可以賦值
可視區(qū)尺寸 寬 document,documentElement.clientWidth 高 document.documentElement.clientHeight
滾動(dòng)距離 document.documentElement.scrollTop (ie ff) | document.body.scrollTop
div固定定位:非ie6瀏覽器 position:fixed;
其他瀏覽器 position:absolute;并且用js實(shí)現(xiàn)?
js核心代碼:div.style.top=document.doumentElement.clientHeight-div.offsetHeight+scrollTop+'px';
?
轉(zhuǎn)載于:https://www.cnblogs.com/fairy-0518/p/7375910.html
總結(jié)
- 上一篇: 【转】以操作系统的角度述说线程与进程
- 下一篇: javascript+HTMl5游戏下载