티스토리 뷰

728x90
SMALL

var xWidth = 0;  

var xHeight = 0; 


function getWidth() {  

    xWidth = null;  

    if (window.screen != null)  

        xWidth = window.screen.width;  

  

    return xWidth;  

}  

function getHeight() {  

    xHeight = null;  

    if (window.screen != null)  

        xHeight = window.screen.height;  

  

  

    return xHeight;  

}  

function checkScreen(flag){  

if(flag == 'screen')

alert("screen width : " + getWidth() + ", screen height : " + getHeight() );

else

alert("frame width : " + document.body.clientWidth + ", frame height : " + document.body.clientHeight );

}


<a href="javascript:checkScreen('screen');">창가로 사이즈</a>

728x90
LIST

'JS' 카테고리의 다른 글

label 텍스트 가져오기  (0) 2013.10.18
애드센스 반응형웹 광고사이즈  (0) 2013.07.26
동적 jQuery 레이아웃 라이브러리  (0) 2013.05.31
common.js  (0) 2013.05.31
jquery opener.window 팝업에서 부모창에 접근  (0) 2013.05.13
댓글
공지사항
최근에 올라온 글
최근에 달린 댓글
Total
Today
Yesterday
링크
«   2025/04   »
1 2 3 4 5
6 7 8 9 10 11 12
13 14 15 16 17 18 19
20 21 22 23 24 25 26
27 28 29 30
글 보관함
250x250