zoukankan      html  css  js  c++  java
  • 获取网页信息 高度宽度等

    console.log("网页可见区域宽: " + document.body.clientWidth)
    
    				console.log("网页可见区域高:" + document.body.clientHeight)
    
    				console.log("网页可见区域宽:" + document.body.offsetWidth + "(包括边线的宽")
    
    				console.log("网页可见区域高:" + document.body.offsetHeight + "(包括边线的高)")
    
    				console.log("网页正文全文宽:" + document.body.scrollWidth)
    
    				console.log("网页正文全文高: " + document.body.scrollHeight)
    
    				console.log("网页被卷去的高: " + document.body.scrollTop)
    
    				console.log("网页被卷去的左: " + document.body.scrollLeft)
    
    				console.log("网页正文部分上: " + window.screenTop)
    
    				console.log("网页正文部分左:" + window.screenLeft)
    
    				console.log("屏幕分辨率的高:" + window.screen.height)
    
    				console.log("屏幕分辨率的宽: " + window.screen.width)
    
    				console.log("屏幕可用工作区高度:" + window.screen.availHeight)
    
    				console.log("屏幕可用工作区宽度: " + window.screen.availWidth)
    document.documentElement.clientHeight//OK

      

  • 相关阅读:
    CF110A Nearly Lucky Number
    Max Sum Plus Plus HDU – 1024
    洛谷 p1003 铺地毯
    poj-1226
    Where is the Marble? UVA – 10474
    Read N Characters Given Read4
    Guess Number Higher or Lower && 九章二分法模板
    Intersection of Two Arrays II
    Reverse Vowels of a String
    Meeting Rooms
  • 原文地址:https://www.cnblogs.com/lgjc/p/6414999.html
Copyright © 2011-2022 走看看