A

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

· 17년 전 · 2138
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,252
17년 전 조회 1,559
17년 전 조회 1,734
17년 전 조회 2,726
17년 전 조회 2,152
17년 전 조회 1,804
17년 전 조회 4,210
17년 전 조회 3,057
17년 전 조회 1,448
17년 전 조회 3,579
17년 전 조회 2,810
17년 전 조회 2,088
17년 전 조회 1,307
17년 전 조회 2,346
17년 전 조회 2,080
17년 전 조회 1,992
17년 전 조회 1,939
17년 전 조회 1,188
17년 전 조회 1,892
17년 전 조회 2,947
17년 전 조회 1,446
17년 전 조회 1,686
17년 전 조회 1,370
17년 전 조회 1,617
17년 전 조회 1,589
17년 전 조회 1,463
17년 전 조회 2,574
17년 전 조회 2,339
17년 전 조회 2,117
17년 전 조회 1,430
17년 전 조회 2,444
17년 전 조회 4,264
17년 전 조회 2,749
17년 전 조회 1,672
17년 전 조회 1,866
17년 전 조회 3,245
17년 전 조회 2,250
17년 전 조회 3,841
17년 전 조회 1,692
17년 전 조회 2,282
17년 전 조회 2,114
17년 전 조회 1,629
17년 전 조회 2,146
17년 전 조회 1,943
17년 전 조회 1,976
17년 전 조회 3,087
17년 전 조회 2,162
17년 전 조회 1,452
17년 전 조회 1,475
17년 전 조회 2,139
17년 전 조회 3,215
17년 전 조회 2,153
17년 전 조회 1,545
17년 전 조회 4,249
17년 전 조회 2,037
17년 전 조회 3,470
17년 전 조회 6,043
17년 전 조회 1,500
17년 전 조회 1,669
17년 전 조회 1,252
17년 전 조회 1,363
17년 전 조회 2,887
17년 전 조회 1,920
17년 전 조회 2,606
17년 전 조회 1,312
17년 전 조회 3,193
17년 전 조회 2,175
17년 전 조회 2,616
17년 전 조회 1,417
17년 전 조회 1,765
17년 전 조회 1,163
17년 전 조회 1,217
17년 전 조회 1,792
17년 전 조회 1,238
17년 전 조회 4,321
17년 전 조회 1,519
17년 전 조회 2,016
17년 전 조회 7,100
17년 전 조회 1,393
17년 전 조회 1,910
17년 전 조회 3,138
17년 전 조회 1,235
17년 전 조회 1,997
17년 전 조회 1,166
17년 전 조회 1,869
17년 전 조회 2,162
17년 전 조회 2,978
17년 전 조회 1,254
17년 전 조회 1,345
17년 전 조회 1,572
17년 전 조회 1,234
17년 전 조회 4,371
17년 전 조회 3,913
17년 전 조회 2,803
17년 전 조회 1,604
17년 전 조회 1,349
17년 전 조회 1,617
17년 전 조회 2,533
17년 전 조회 1,746
17년 전 조회 2,034
🐛 버그신고