Use the height of method in jquery to get various heights

  • 2020-03-30 02:31:53
  • OfStack


alert($(window).height()); //Height of the visible area of the browser's current window
alert($(document).height()); //The height of the document in the browser's current window
alert($(document.body).height());//The height of the body of the browser's current window document
alert($(document.body).outerHeight(true));//The total height of the body of the browser's current window document includes the border padding margin
alert($(window).width()); //The width of the visible area of the browser's current window
alert($(document).width());//Width of the document object in the browser's current window
alert($(document.body).width());//The height of the body of the browser's current window document
alert($(document.body).outerWidth(true));// Browser current window document body The total width of the   including border padding margin


Related articles: