js to get the browser height and width values (transfer)

2010-12-01  来源:本站原创  分类:Web  人气:92 

Visible region wide web: document.body.clientWidth
Page shows the regional high: document.body.clientHeight
Visible region wide web: document.body.offsetWidth (including the edges of the width)
Page shows the regional high: document.body.offsetHeight (including the edges of H)
Full body of the page width: document.body.scrollWidth
Full of high body of the page: document.body.scrollHeight
Web page is to the high volume: document.body.scrollTop
Web is rolled to the left: document.body.scrollLeft
Part of the body of the page: window.screenTop
Part of the left body of the page: window.screenLeft
The high screen resolution: window.screen.height
Wide-screen resolution: window.screen.width
Height of the screen work area available: window.screen.availHeight
The width of the screen work area available: window.screen.availWidth

Note that in XHTML standards body into the next place documentElement

Transfer from: http://www.cnblogs.com/zengjun1980/archive/2008/07/05/1236166.html

相关文章
  • js to get the browser height and width values (transfer) 2010-12-01

    Visible region wide web: document.body.clientWidth Page shows the regional high: document.body.clientHeight Visible region wide web: document.body.offsetWidth (including the edges of the width) Page shows the regional high: document.body.offsetHeight

  • js to get the browser height and width values (multi-browser) 2010-11-08

    IE in: document.body.clientWidth ==> BODY object width document.body.clientHeight ==> BODY object height document.documentElement.clientWidth ==> the width of the visible region document.documentElement.clientHeight ==> highly visible area Fir

  • js get browser height and width values (multi-browser) (reproduced) 2010-09-13

    IE in: document.body.clientWidth ==> BODY object width document.body.clientHeight ==> BODY object height document.documentElement.clientWidth ==> visible area width document.documentElement.clientHeight ==> highly visible area FireFox in: docu

  • js获取height和width的方法说明 2014-02-05

    js获取height和width属性的值在日常开发中很常见,于是本人搜集整理了一下,感兴趣的朋友可以参考下 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html> <head> <title>js获取height和wid

  • Different browsers on the height and width html.body different analytical 2010-05-27

    1. Html-body tag nesting together html ( background: # DDABC0; ) body ( background: # 3311BB; height: 100%; width: 100%; ) In ie 6 under the body's height and width for the browser you can see the height and width, in other browsers do not show, only

  • Element JQuery get real top.left.height and width property value of object 2010-06-08

    In an e-commerce website implementation process, it was found that the actual JQuery1.3.2 get Element top, left, height and width, the IE browser, and Chrome for the need to use different code to get. In order to facilitate the reunification of use,

  • jQuery get element position and adjust the height and width of the dynamic open a new window 2010-09-13

    The period of jQuery simulated a new window to open easily use javascript to create a new window in an article by jQuery simulation a new window opens to create a new window to see jQuery open a new window mechanism theory, but by carefully we find t

  • javascript to get the current window height and width 2009-06-19

    In the javascript to get the current window height and width <body><SCRIPT LANGUAGE="JavaScript"> var s = " Web page visible area width :"+ document.body.clientWidth; s += "\r\n Web page visible area of the high :"

  • javaScript to obtain the height and width of the window 2010-05-08

    In the javascript get the current window height and width <body> <SCRIPT LANGUAGE="JavaScript"> var s = ""; s + = "\ r \ n page visible area width:" + document.body.clientWidth; s + = "\ r \ n page shows the

  • android to get the height and width of the screen 2010-12-03

    Android defined in DisplayMetrics some properties of the screen can be obtained by getMetrics DisplayMetrics property of the current screen, to obtain the screen width and height. Now we will get the screen width and height of the screen. Screenshot

  • ExtJS adaptive height and width [transfer] 2010-12-09

    ExtJS Let the page bottom panel Adaptive height and width getGridHeight = function(panelNameOne, panelNameTwo, panelThree) { // Gets the page bottom grid height , You can customize the settings according to the resolution, depending on the project ne

  • JS for the screen, browser, web height width 2010-09-15

    Page shows the regional wide: document.body.clientWidth Page shows the regional high: document.body.clientHeight Page shows the regional wide: document.body.offsetWidth (including the edges of the width) Page shows the regional high: document.body.of

  • js in the top, left, height, width parameters and examples of analytic 2009-09-26

    The following analysis of these parameters are directed to the IE browser: Get screen coordinates of the mouse, as opposed to the entire page: x = event.clientX, y = event.clientY Be the width of the current window: w = document.body.clientWidth; h =

  • js, jQuery, javascript get height and width of the page 2010-08-22

    Page shows the regional wide: document.body.clientWidth Page shows the regional high: document.body.clientHeight Page shows the regional wide: document.body.offsetWidth (including the edges of the width) Page shows the regional high: document.body.of

  • JS perfect drag + drag to change the width and height + Div Close button 2010-12-31

    Div perfect drag + drag to change the width and height + Close button

  • javascript get height and width of the page code 2010-06-16

    Note: doctype stated: html 4.01 strict After a lot of pages in the search, Following in IE6 and firefox 3.0 under the test Access to the page with the js code width and height are as follows: 1, IE follows: document.body.scrollWidth; document.body.sc

  • Used to validate upload image size, height to width (transfer) 2010-04-07

    <script> UpLoadFileCheck = function () ( this.AllowExt = ". jpg,. gif"; / / allowed to upload each file type 0 for unlimited extension of the back to add a "" lower-case letters this.AllowImgFileSize = 0; / / allow upload file si

  • Set picture height and width 2010-06-07

    Set the image width and height to set up a on it, because it is proportional scaling. Such as width = 100, height = 200. When the set width = 50 pm. height is automatically set to 100 up.

  • JQuery for page height and page width, window height, window width 2010-08-18

    function ___getPageSize() { var xScroll, yScroll; if (window.innerHeight && window.scrollMaxY) { xScroll = window.innerWidth + window.scrollMaxX; yScroll = window.innerHeight + window.scrollMaxY; } else if (document.body.scrollHeight > document

  • Using javascript to obtain information such as height and width of the screen 2010-08-18

    Page shows the regional wide: document.body.clientWidth Page shows the regional high: document.body.clientHeight Page shows the regional wide: document.body.offsetWidth (including the edges of the width) Page shows the regional high: document.body.of