A

브라우저 호환되는 여러가지 좌표값 구하기

· 17년 전 · 2497
var Q_dmnsn = {
/*
Browser: MSIE7, Firefox3, Safari3, Opera9
DTD: Quirks, Strict XHTML 1.0, Strict HTML 4.01
Update: 2008-09-02
*/
    get_lft  : function(idntty) { return parseInt(document.getElementById(idntty).style.left  ); }
    ,get_top  : function(idntty) { return parseInt(document.getElementById(idntty).style.top  ); }
    ,get_wdth  : function(idntty) { return parseInt(document.getElementById(idntty).style.width ); }
    ,get_hght  : function(idntty) { return parseInt(document.getElementById(idntty).style.height); }
    ,set_lft  : function(idntty,nmbr) { document.getElementById(idntty).style.left  = nmbr+"px"; }
    ,set_top  : function(idntty,nmbr) { document.getElementById(idntty).style.top    = nmbr+"px"; }
    ,set_wdth  : function(idntty,nmbr) { document.getElementById(idntty).style.width  = nmbr+"px"; }
    ,set_hght  : function(idntty,nmbr) { document.getElementById(idntty).style.height = nmbr+"px"; }

    ,get_scrll_lft : function(idntty) {
        if(document.body.scrollLeft) return document.body.scrollLeft;
        else return document.documentElement.scrollLeft;
    }
    ,get_scrll_top : function(idntty) {
        if(document.body.scrollTop) return document.body.scrollTop;
        else return document.documentElement.scrollTop;
    }
    ,set_scrll_lft : function(nmbr) {
        document.body.scrollLeft = nmbr;
        document.documentElement.scrollLeft = nmbr;
    }
    ,set_scrll_top : function(nmbr) {
        document.body.scrollTop = nmbr;
        document.documentElement.scrollTop = nmbr;
    }
    ,clnt_wdth : function() {
        if(typeof(document.compatMode)=='undefined' ) return document.documentElement.clientWidth;
        else if(document.compatMode  =='BackCompat') return document.body.clientWidth;
        else if(document.compatMode  =='CSS1Compat') return document.documentElement.clientWidth;
    }
    ,clnt_hght : function() {
        if(typeof(document.compatMode)=='undefined' ) return document.documentElement.clientHeight;
        else if(document.compatMode  =='BackCompat') return document.body.clientHeight;
        else if(document.compatMode  =='CSS1Compat') return document.documentElement.clientHeight;
    }
    ,clnt_x : function(e) {
        if(e) return e.clientX; else  return event.clientX;
    }
    ,clnt_y : function(e) {
        if(e) return e.clientY; else  return event.clientY;
    }
};
[이 게시물은 관리자님에 의해 2011-10-31 17:16:08 PHP & HTML에서 이동 됨]
|
댓글을 작성하시려면 로그인이 필요합니다.

프로그램

+
제목 글쓴이 날짜 조회
17년 전 조회 2,623
17년 전 조회 1,932
17년 전 조회 2,129
17년 전 조회 3,083
17년 전 조회 2,528
17년 전 조회 2,178
17년 전 조회 4,607
17년 전 조회 3,413
17년 전 조회 1,816
17년 전 조회 3,958
17년 전 조회 3,192
17년 전 조회 2,441
17년 전 조회 1,701
17년 전 조회 2,713
17년 전 조회 2,445
17년 전 조회 2,375
17년 전 조회 2,318
17년 전 조회 1,547
17년 전 조회 2,255
17년 전 조회 3,301
17년 전 조회 1,790
17년 전 조회 2,051
17년 전 조회 1,726
17년 전 조회 1,981
17년 전 조회 1,948
17년 전 조회 1,851
17년 전 조회 2,937
17년 전 조회 2,700
17년 전 조회 2,495
17년 전 조회 1,785
17년 전 조회 2,813
17년 전 조회 4,618
17년 전 조회 3,114
17년 전 조회 2,037
17년 전 조회 2,226
17년 전 조회 3,636
17년 전 조회 2,628
17년 전 조회 4,195
17년 전 조회 2,040
17년 전 조회 2,633
17년 전 조회 2,476
17년 전 조회 1,999
17년 전 조회 2,500
17년 전 조회 2,326
17년 전 조회 2,348
17년 전 조회 3,464
17년 전 조회 2,526
17년 전 조회 1,806
17년 전 조회 1,832
17년 전 조회 2,498
17년 전 조회 3,580
17년 전 조회 2,497
17년 전 조회 1,922
17년 전 조회 4,627
17년 전 조회 2,401
17년 전 조회 3,852
17년 전 조회 6,408
17년 전 조회 1,856
17년 전 조회 2,027
17년 전 조회 1,602
17년 전 조회 1,717
17년 전 조회 3,245
17년 전 조회 2,291
17년 전 조회 2,940
17년 전 조회 1,653
17년 전 조회 3,564
17년 전 조회 2,525
17년 전 조회 2,974
17년 전 조회 1,784
17년 전 조회 2,123
17년 전 조회 1,504
17년 전 조회 1,556
17년 전 조회 2,155
17년 전 조회 1,567
17년 전 조회 4,661
17년 전 조회 1,872
17년 전 조회 2,356
17년 전 조회 7,457
17년 전 조회 1,727
17년 전 조회 2,268
17년 전 조회 3,507
17년 전 조회 1,561
17년 전 조회 2,331
17년 전 조회 1,484
17년 전 조회 2,178
17년 전 조회 2,514
17년 전 조회 3,321
17년 전 조회 1,600
17년 전 조회 1,673
17년 전 조회 1,912
17년 전 조회 1,571
17년 전 조회 4,720
17년 전 조회 4,240
17년 전 조회 3,168
17년 전 조회 1,938
17년 전 조회 1,675
17년 전 조회 1,939
17년 전 조회 2,877
17년 전 조회 2,081
17년 전 조회 2,350