A

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

· 17년 전 · 2126
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,245
17년 전 조회 1,547
17년 전 조회 1,722
17년 전 조회 2,716
17년 전 조회 2,139
17년 전 조회 1,792
17년 전 조회 4,198
17년 전 조회 3,044
17년 전 조회 1,437
17년 전 조회 3,570
17년 전 조회 2,797
17년 전 조회 2,077
17년 전 조회 1,294
17년 전 조회 2,329
17년 전 조회 2,066
17년 전 조회 1,979
17년 전 조회 1,922
17년 전 조회 1,174
17년 전 조회 1,878
17년 전 조회 2,931
17년 전 조회 1,432
17년 전 조회 1,674
17년 전 조회 1,355
17년 전 조회 1,603
17년 전 조회 1,576
17년 전 조회 1,447
17년 전 조회 2,562
17년 전 조회 2,325
17년 전 조회 2,106
17년 전 조회 1,416
17년 전 조회 2,430
17년 전 조회 4,253
17년 전 조회 2,740
17년 전 조회 1,660
17년 전 조회 1,853
17년 전 조회 3,230
17년 전 조회 2,231
17년 전 조회 3,828
17년 전 조회 1,675
17년 전 조회 2,272
17년 전 조회 2,101
17년 전 조회 1,616
17년 전 조회 2,131
17년 전 조회 1,928
17년 전 조회 1,965
17년 전 조회 3,077
17년 전 조회 2,150
17년 전 조회 1,438
17년 전 조회 1,462
17년 전 조회 2,127
17년 전 조회 3,204
17년 전 조회 2,139
17년 전 조회 1,532
17년 전 조회 4,237
17년 전 조회 2,026
17년 전 조회 3,460
17년 전 조회 6,033
17년 전 조회 1,485
17년 전 조회 1,654
17년 전 조회 1,238
17년 전 조회 1,350
17년 전 조회 2,872
17년 전 조회 1,909
17년 전 조회 2,594
17년 전 조회 1,305
17년 전 조회 3,180
17년 전 조회 2,161
17년 전 조회 2,603
17년 전 조회 1,406
17년 전 조회 1,754
17년 전 조회 1,152
17년 전 조회 1,207
17년 전 조회 1,780
17년 전 조회 1,225
17년 전 조회 4,306
17년 전 조회 1,503
17년 전 조회 2,004
17년 전 조회 7,091
17년 전 조회 1,380
17년 전 조회 1,897
17년 전 조회 3,126
17년 전 조회 1,223
17년 전 조회 1,983
17년 전 조회 1,156
17년 전 조회 1,853
17년 전 조회 2,152
17년 전 조회 2,963
17년 전 조회 1,241
17년 전 조회 1,331
17년 전 조회 1,557
17년 전 조회 1,226
17년 전 조회 4,356
17년 전 조회 3,899
17년 전 조회 2,789
17년 전 조회 1,591
17년 전 조회 1,336
17년 전 조회 1,605
17년 전 조회 2,521
17년 전 조회 1,735
17년 전 조회 2,019
🐛 버그신고