JQuery:
$(document).ready(function(){
alert($(window).height()); // The height of the viewable area of the browser's current window
alert($(document).height()); // The height of the browser's current window document
alert($(document.body).height());// Browser current window document body Height
alert($(document.body).outerHeight(true));// Browser current window document body The total height of Include border padding margin alert($(window).width()); // The width of the viewable area of the browser's current window
alert($(document).width());// Browser current window document object width
alert($(document.body).width());// Browser current window document body Width
alert($(document.body).outerWidth(true));// Browser current window document body Total width of Include border padding margin }) Javascript: Page visible area width : document.body.clientWidth
Page visible area high : document.body.clientHeight
Page visible area width : document.body.offsetWidth ( Including the width of the sideline )
Page visible area high : document.body.offsetHeight ( Height including edge line )
Full text width of web page body : document.body.scrollWidth
Page body full text height : document.body.scrollHeight
Web pages are rolled high : document.body.scrollTop
Left side of web page : document.body.scrollLeft
On the body of the page : window.screenTop
Page body left : window.screenLeft
High screen resolution : window.screen.height
Width of screen resolution : window.screen.width
Screen available workspace height : window.screen.availHeight
Screen available workspace width : window.screen.availWidth

JS,JQuery More articles about getting the width and height of the screen

  1. android To get the width and height of the screen

    Get the width and height of the screen : Method 1 : // Get the width of the screen public static int getScreenWidth(Context context) { WindowManager manager ...

  2. Java Get the width and height of the screen

    Get the width and height of the screen 1 import java.awt.Dimension; 2 import java.awt.Toolkit; 3 4 public class Main { 5 6 publi ...

  3. JS,Jquery Get the width and height of the screen

    Javascript: Page visible area width : document.body.clientWidth Page visible area high : document.body.clientHeight Page visible area width : document.b ...

  4. JS Get the width and height of the screen , All kinds of ways

      Javascript: Page visible area width : document.body.clientWidth Page visible area high : document.body.clientHeight Page visible area width : document ...

  5. Android Get the width and height of the screen (dp)

    public void getAndroiodScreenProperty() { WindowManager wm = (WindowManager) this.getSystemService(C ...

  6. C# Get the width and height of the screen

    //1. Show the form in the lower right corner of the screen // This area does not include Rectangle ScreenArea = System.Windows.Forms.Screen.GetWorkingArea(this ...

  7. react native Get the width and height of the screen

    var Dimensions = require('Dimensions'); var {width,height} = Dimensions.get("window");// First of all ...

  8. JS Get screen , Browser window size , Web page height width ( Implementation code )_javascript skill _

    JS Get screen , Browser window size , Web page height width ( Implementation code )_javascript skill _--HTML5 Chinese learning network http://www.html5cn.com.cn/shili/javascripts/79 ...

  9. js、jq Get screen width and height

    Reference material JS,Jquery Get the width and height of various screens

Random recommendation

  1. SRETAN

    SRETAN (sretan.pas/c/cpp) Title Description 4 and 7 It's a lucky number , Input k, Output No k One contains only 4 and 7 Number of numbers . Input format Count one line at a time k Output format A number on a line is the answer The sample input 3 Sample output 44 ...

  2. POJ 3286 How many 0's?( digit DP)

    Topic link At last , Boundaries make me wa Several times , Obscene use of AC Code to shoot , Very helpless , In a very troublesome way . Write about the , I think we'll meet again in the future , I can't understand what this is about . I've done it before , Statistics 1 and 2 Of , Statistics 0 Than 1 and 2 It's a lot of trouble , A leading 0 Of ...

  3. SQL The cursor to update

    -- Define cursors DECLARE cur_getaddress CURSOR FOR SELECT new_a ,new_b ,new_c ,new_d FROM table WHERE (new_a i ...

  4. Javascript function ( Definition 、 Pass value 、 heavy load )

    Javascript Functions are defined in more than one way . The first way : function fn1(){ alert(typeof fn1); alert(“fn1”); } It can be called directly fu1() ...

  5. < Nine > Object oriented analysis UML Design class of core elements , class , attribute , Method , visibility

    Design class

  6. HDU 4911 Inversion ( Reverse order number Merge sort )

    Inversion Topic link : http://acm.hust.edu.cn/vjudge/contest/121349#problem/A Description bobo has a sequen ...

  7. WebAPI 15 CORS

    WebAPI 15 CORS The same-origin policy First, for security reasons , Browsers have the same origin policy , The same origin policy prevents a document or script loaded from one source from obtaining or setting the properties of a document loaded from another source . For homology, it must be URL In the following ways ...

  8. Memcached Install and configure maximum memory usage

    Memcached Install and configure maximum memory usage The project has done a lot , Although with memcached There are also a lot of projects . But I didn't pay much attention to installation memcached Details Recently I did a project , Put a lot of things in memcached In cache , ...

  9. php Prevent browsers from repeatedly submitting data by clicking the return button

    <!--html Store hidden domain data in --> <input type="hidden" value='{$sun_nums}' name='sub_nums' /> ...

  10. Golang Go Go Go part2: Variable and constant declarations

    3、 ... and . Keywords and built-in pre declared constants . type . function 1. keyword Go Yes 25 Key words , It can only be used where grammar allows , Cannot be used as a name , They are : break          default         func    ...