»Ë»Ñ Æ÷·³

Jquery·Î ¸ð´ÏÅÍ, ºê¶ó¿ìÀú µî ³ôÀÌ ¹× ³ÐÀÌ Á¤º¸¸¦ °¡Á®¿À´Â ¹æ¹ý¿¹½Ã1

$(function(){
$(window).resize( function(){
  $("#screenWidth").html( screen.width);
  $("#screenHeight").html( screen.height);
  $("#screenAvailWidth").html( screen.availWidth);
  $("#screenAvailHeight").html( screen.availHeight);
  $("#windowScreenX").html( window.screenX);
  $("#windowScreenY").html( window.screenY);
  $("#windowScreenLeft").html( window.screenLeft);
  $("#windowScreenTop").html( window.screenTop );
  $("#windowOuterWidth").html( window.outerWidth);
  $("#windowOuterHeight").html( window.outerHeight);
  $("#windowInnerWidth").html( window.innerWidth);
  $("#windowInnerHeight").html( window.innerHeight);
  $("#bodyClientWidth").html( document.body.clientWidth);
  $("#bodyClientHeight").html( document.body.clientHeight);
  $("#docElementClientWidth").html( document.documentElement.clientWidth);
  $("#docElementClientHeight").html( document.documentElement.clientHeight);
  $("#bodyScrollWidth").html( document.body.scrollWidth );
  $("#bodyScrollHeight").html( document.body.scrollHeight );
  $("#docElementScrollWidth").html( document.documentElement.scrollWidth );
  $("#docElementScrollHeight").html( document.documentElement.scrollHeight );

  var status1 = "";
  status1 += "selector1.outerHeight() : " + $("#selector1").outerHeight();
  status1 += "
";
  status1 += "selector1.outerHeight(trur) - margin (top °ú bottom) Æ÷ÇÔ : " + $("#selector1").outerHeight(true);
  status1 += "
";
  status1 += "selector1.innerHeight() : " + $("#selector1").innerHeight();
  $("#selectorStatus").html(status1);
}).resize();

$(window).scroll( function(){
  $("#bodyScrollTop").html( document.body.scrollTop );
  $("#bodyScrollLeft").html( document.body.scrollLeft );
  $("#docElementScrollTop").html( document.documentElement.scrollTop );
  $("#docElementScrollLeft").html( document.documentElement.scrollLeft );
  $("#windowPageXOffset").html( window.pageXOffset );
  $("#windowPageYOffset").html( window.pageYOffset );
  $("#selector2_1_OffsetTop").html( $("#selector2_1").offset().top);
  $("#selector2_1_OffsetLeft").html( $("#selector2_1").offset().left);
  var selector2_1_ScrollTop = $("#selector2_1").offset().top - $(window).scrollTop();
  $("#selector2_1_ScrollTop").html( selector2_1_ScrollTop );
  var selector2_1_ScrollLeft = $("#selector2_1").offset().left - $(window).scrollLeft();
  $("#selector2_1_ScrollLeft").html( selector2_1_ScrollLeft );
  $("#selector2_1_ScrollWidth").html( document.getElementById("selector2_1").scrollWidth );
  $("#selector2_1_ScrollHeight").html( document.getElementById("selector2_1").scrollHeight );
} ).scroll();
});

1
ÃßõÇϱ⠴ٸ¥ÀÇ°ß 0
ºÏ¸¶Å©¹öÆ° °øÀ¯¹öÆ°

´Ù¸¥ÀÇ°ß 0 Ãßõ 0 Ãáõ¿¡»ì¾Æ¿ä
2013-04-24 Á¡¾ÆÀÌÄÜ
  1. ´ñ±ÛÁÖ¼Òº¹»ç
  • ¾Ë¸² ¿å¼³, »óó ÁÙ ¼ö ÀÖ´Â ¾ÇÇÃÀº »ï°¡ÁÖ¼¼¿ä.
©¹æ »çÁø  
¡â ÀÌÀü±Û¡ä ´ÙÀ½±Û