A

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

· 17년 전 · 2133
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,249
17년 전 조회 1,553
17년 전 조회 1,731
17년 전 조회 2,720
17년 전 조회 2,148
17년 전 조회 1,802
17년 전 조회 4,203
17년 전 조회 3,052
17년 전 조회 1,444
17년 전 조회 3,574
17년 전 조회 2,806
17년 전 조회 2,081
17년 전 조회 1,302
17년 전 조회 2,338
17년 전 조회 2,074
17년 전 조회 1,988
17년 전 조회 1,935
17년 전 조회 1,183
17년 전 조회 1,889
17년 전 조회 2,939
17년 전 조회 1,440
17년 전 조회 1,683
17년 전 조회 1,365
17년 전 조회 1,610
17년 전 조회 1,585
17년 전 조회 1,456
17년 전 조회 2,569
17년 전 조회 2,333
17년 전 조회 2,112
17년 전 조회 1,422
17년 전 조회 2,439
17년 전 조회 4,260
17년 전 조회 2,745
17년 전 조회 1,669
17년 전 조회 1,860
17년 전 조회 3,239
17년 전 조회 2,243
17년 전 조회 3,837
17년 전 조회 1,687
17년 전 조회 2,278
17년 전 조회 2,109
17년 전 조회 1,624
17년 전 조회 2,139
17년 전 조회 1,937
17년 전 조회 1,972
17년 전 조회 3,083
17년 전 조회 2,157
17년 전 조회 1,446
17년 전 조회 1,471
17년 전 조회 2,134
17년 전 조회 3,212
17년 전 조회 2,149
17년 전 조회 1,542
17년 전 조회 4,243
17년 전 조회 2,033
17년 전 조회 3,467
17년 전 조회 6,037
17년 전 조회 1,496
17년 전 조회 1,663
17년 전 조회 1,245
17년 전 조회 1,356
17년 전 조회 2,879
17년 전 조회 1,918
17년 전 조회 2,600
17년 전 조회 1,309
17년 전 조회 3,189
17년 전 조회 2,168
17년 전 조회 2,609
17년 전 조회 1,413
17년 전 조회 1,761
17년 전 조회 1,154
17년 전 조회 1,213
17년 전 조회 1,786
17년 전 조회 1,233
17년 전 조회 4,314
17년 전 조회 1,512
17년 전 조회 2,012
17년 전 조회 7,098
17년 전 조회 1,387
17년 전 조회 1,903
17년 전 조회 3,137
17년 전 조회 1,228
17년 전 조회 1,990
17년 전 조회 1,164
17년 전 조회 1,861
17년 전 조회 2,158
17년 전 조회 2,970
17년 전 조회 1,247
17년 전 조회 1,340
17년 전 조회 1,567
17년 전 조회 1,230
17년 전 조회 4,365
17년 전 조회 3,907
17년 전 조회 2,796
17년 전 조회 1,596
17년 전 조회 1,342
17년 전 조회 1,609
17년 전 조회 2,528
17년 전 조회 1,745
17년 전 조회 2,027
🐛 버그신고