A

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

· 17년 전 · 2123
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,240
17년 전 조회 1,544
17년 전 조회 1,717
17년 전 조회 2,711
17년 전 조회 2,135
17년 전 조회 1,788
17년 전 조회 4,193
17년 전 조회 3,040
17년 전 조회 1,431
17년 전 조회 3,565
17년 전 조회 2,794
17년 전 조회 2,075
17년 전 조회 1,291
17년 전 조회 2,324
17년 전 조회 2,064
17년 전 조회 1,977
17년 전 조회 1,919
17년 전 조회 1,171
17년 전 조회 1,875
17년 전 조회 2,929
17년 전 조회 1,430
17년 전 조회 1,671
17년 전 조회 1,352
17년 전 조회 1,599
17년 전 조회 1,571
17년 전 조회 1,444
17년 전 조회 2,557
17년 전 조회 2,320
17년 전 조회 2,102
17년 전 조회 1,412
17년 전 조회 2,424
17년 전 조회 4,247
17년 전 조회 2,736
17년 전 조회 1,657
17년 전 조회 1,851
17년 전 조회 3,227
17년 전 조회 2,229
17년 전 조회 3,823
17년 전 조회 1,671
17년 전 조회 2,269
17년 전 조회 2,098
17년 전 조회 1,613
17년 전 조회 2,128
17년 전 조회 1,925
17년 전 조회 1,959
17년 전 조회 3,073
17년 전 조회 2,147
17년 전 조회 1,436
17년 전 조회 1,458
17년 전 조회 2,124
17년 전 조회 3,199
17년 전 조회 2,137
17년 전 조회 1,528
17년 전 조회 4,234
17년 전 조회 2,023
17년 전 조회 3,455
17년 전 조회 6,030
17년 전 조회 1,482
17년 전 조회 1,653
17년 전 조회 1,233
17년 전 조회 1,343
17년 전 조회 2,869
17년 전 조회 1,904
17년 전 조회 2,591
17년 전 조회 1,299
17년 전 조회 3,177
17년 전 조회 2,158
17년 전 조회 2,600
17년 전 조회 1,403
17년 전 조회 1,753
17년 전 조회 1,149
17년 전 조회 1,204
17년 전 조회 1,776
17년 전 조회 1,222
17년 전 조회 4,302
17년 전 조회 1,498
17년 전 조회 2,001
17년 전 조회 7,088
17년 전 조회 1,377
17년 전 조회 1,894
17년 전 조회 3,124
17년 전 조회 1,222
17년 전 조회 1,979
17년 전 조회 1,152
17년 전 조회 1,850
17년 전 조회 2,149
17년 전 조회 2,961
17년 전 조회 1,239
17년 전 조회 1,328
17년 전 조회 1,554
17년 전 조회 1,221
17년 전 조회 4,353
17년 전 조회 3,897
17년 전 조회 2,785
17년 전 조회 1,588
17년 전 조회 1,332
17년 전 조회 1,599
17년 전 조회 2,515
17년 전 조회 1,731
17년 전 조회 2,016
🐛 버그신고