A

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

· 17년 전 · 2171
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,278
17년 전 조회 1,590
17년 전 조회 1,761
17년 전 조회 2,751
17년 전 조회 2,181
17년 전 조회 1,837
17년 전 조회 4,241
17년 전 조회 3,088
17년 전 조회 1,480
17년 전 조회 3,613
17년 전 조회 2,839
17년 전 조회 2,111
17년 전 조회 1,335
17년 전 조회 2,374
17년 전 조회 2,108
17년 전 조회 2,019
17년 전 조회 1,971
17년 전 조회 1,223
17년 전 조회 1,918
17년 전 조회 2,969
17년 전 조회 1,481
17년 전 조회 1,718
17년 전 조회 1,398
17년 전 조회 1,647
17년 전 조회 1,623
17년 전 조회 1,493
17년 전 조회 2,601
17년 전 조회 2,368
17년 전 조회 2,143
17년 전 조회 1,457
17년 전 조회 2,471
17년 전 조회 4,287
17년 전 조회 2,781
17년 전 조회 1,694
17년 전 조회 1,898
17년 전 조회 3,282
17년 전 조회 2,282
17년 전 조회 3,872
17년 전 조회 1,713
17년 전 조회 2,313
17년 전 조회 2,142
17년 전 조회 1,655
17년 전 조회 2,174
17년 전 조회 1,971
17년 전 조회 2,011
17년 전 조회 3,123
17년 전 조회 2,198
17년 전 조회 1,472
17년 전 조회 1,507
17년 전 조회 2,172
17년 전 조회 3,246
17년 전 조회 2,185
17년 전 조회 1,569
17년 전 조회 4,280
17년 전 조회 2,069
17년 전 조회 3,498
17년 전 조회 6,071
17년 전 조회 1,531
17년 전 조회 1,691
17년 전 조회 1,276
17년 전 조회 1,384
17년 전 조회 2,916
17년 전 조회 1,942
17년 전 조회 2,640
17년 전 조회 1,341
17년 전 조회 3,220
17년 전 조회 2,204
17년 전 조회 2,646
17년 전 조회 1,441
17년 전 조회 1,803
17년 전 조회 1,188
17년 전 조회 1,246
17년 전 조회 1,817
17년 전 조회 1,261
17년 전 조회 4,340
17년 전 조회 1,544
17년 전 조회 2,047
17년 전 조회 7,129
17년 전 조회 1,419
17년 전 조회 1,935
17년 전 조회 3,163
17년 전 조회 1,256
17년 전 조회 2,030
17년 전 조회 1,186
17년 전 조회 1,886
17년 전 조회 2,193
17년 전 조회 3,010
17년 전 조회 1,278
17년 전 조회 1,371
17년 전 조회 1,595
17년 전 조회 1,257
17년 전 조회 4,395
17년 전 조회 3,938
17년 전 조회 2,830
17년 전 조회 1,625
17년 전 조회 1,367
17년 전 조회 1,643
17년 전 조회 2,558
17년 전 조회 1,765
17년 전 조회 2,056