A

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

· 17년 전 · 2134
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,250
17년 전 조회 1,555
17년 전 조회 1,731
17년 전 조회 2,722
17년 전 조회 2,150
17년 전 조회 1,802
17년 전 조회 4,205
17년 전 조회 3,055
17년 전 조회 1,447
17년 전 조회 3,574
17년 전 조회 2,807
17년 전 조회 2,085
17년 전 조회 1,304
17년 전 조회 2,340
17년 전 조회 2,074
17년 전 조회 1,991
17년 전 조회 1,937
17년 전 조회 1,184
17년 전 조회 1,890
17년 전 조회 2,942
17년 전 조회 1,442
17년 전 조회 1,684
17년 전 조회 1,367
17년 전 조회 1,614
17년 전 조회 1,586
17년 전 조회 1,458
17년 전 조회 2,570
17년 전 조회 2,335
17년 전 조회 2,114
17년 전 조회 1,423
17년 전 조회 2,440
17년 전 조회 4,261
17년 전 조회 2,745
17년 전 조회 1,671
17년 전 조회 1,863
17년 전 조회 3,240
17년 전 조회 2,245
17년 전 조회 3,839
17년 전 조회 1,687
17년 전 조회 2,280
17년 전 조회 2,111
17년 전 조회 1,627
17년 전 조회 2,143
17년 전 조회 1,940
17년 전 조회 1,974
17년 전 조회 3,085
17년 전 조회 2,158
17년 전 조회 1,447
17년 전 조회 1,472
17년 전 조회 2,135
17년 전 조회 3,212
17년 전 조회 2,151
17년 전 조회 1,542
17년 전 조회 4,243
17년 전 조회 2,034
17년 전 조회 3,468
17년 전 조회 6,042
17년 전 조회 1,498
17년 전 조회 1,666
17년 전 조회 1,247
17년 전 조회 1,360
17년 전 조회 2,882
17년 전 조회 1,919
17년 전 조회 2,603
17년 전 조회 1,311
17년 전 조회 3,189
17년 전 조회 2,172
17년 전 조회 2,614
17년 전 조회 1,413
17년 전 조회 1,762
17년 전 조회 1,156
17년 전 조회 1,214
17년 전 조회 1,789
17년 전 조회 1,234
17년 전 조회 4,317
17년 전 조회 1,517
17년 전 조회 2,013
17년 전 조회 7,100
17년 전 조회 1,391
17년 전 조회 1,906
17년 전 조회 3,137
17년 전 조회 1,231
17년 전 조회 1,992
17년 전 조회 1,165
17년 전 조회 1,865
17년 전 조회 2,158
17년 전 조회 2,974
17년 전 조회 1,250
17년 전 조회 1,342
17년 전 조회 1,570
17년 전 조회 1,231
17년 전 조회 4,368
17년 전 조회 3,908
17년 전 조회 2,798
17년 전 조회 1,597
17년 전 조회 1,345
17년 전 조회 1,611
17년 전 조회 2,530
17년 전 조회 1,746
17년 전 조회 2,029
🐛 버그신고