A

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

· 17년 전 · 2135
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,252
17년 전 조회 1,557
17년 전 조회 1,731
17년 전 조회 2,726
17년 전 조회 2,152
17년 전 조회 1,803
17년 전 조회 4,208
17년 전 조회 3,056
17년 전 조회 1,448
17년 전 조회 3,577
17년 전 조회 2,808
17년 전 조회 2,087
17년 전 조회 1,306
17년 전 조회 2,346
17년 전 조회 2,078
17년 전 조회 1,992
17년 전 조회 1,938
17년 전 조회 1,187
17년 전 조회 1,891
17년 전 조회 2,945
17년 전 조회 1,444
17년 전 조회 1,684
17년 전 조회 1,370
17년 전 조회 1,615
17년 전 조회 1,589
17년 전 조회 1,461
17년 전 조회 2,573
17년 전 조회 2,338
17년 전 조회 2,116
17년 전 조회 1,427
17년 전 조회 2,443
17년 전 조회 4,263
17년 전 조회 2,746
17년 전 조회 1,671
17년 전 조회 1,864
17년 전 조회 3,242
17년 전 조회 2,249
17년 전 조회 3,841
17년 전 조회 1,689
17년 전 조회 2,281
17년 전 조회 2,113
17년 전 조회 1,628
17년 전 조회 2,143
17년 전 조회 1,941
17년 전 조회 1,976
17년 전 조회 3,086
17년 전 조회 2,160
17년 전 조회 1,449
17년 전 조회 1,473
17년 전 조회 2,136
17년 전 조회 3,213
17년 전 조회 2,153
17년 전 조회 1,545
17년 전 조회 4,247
17년 전 조회 2,036
17년 전 조회 3,469
17년 전 조회 6,042
17년 전 조회 1,499
17년 전 조회 1,669
17년 전 조회 1,249
17년 전 조회 1,363
17년 전 조회 2,885
17년 전 조회 1,919
17년 전 조회 2,604
17년 전 조회 1,312
17년 전 조회 3,191
17년 전 조회 2,174
17년 전 조회 2,616
17년 전 조회 1,417
17년 전 조회 1,763
17년 전 조회 1,163
17년 전 조회 1,215
17년 전 조회 1,792
17년 전 조회 1,238
17년 전 조회 4,321
17년 전 조회 1,518
17년 전 조회 2,013
17년 전 조회 7,100
17년 전 조회 1,393
17년 전 조회 1,909
17년 전 조회 3,138
17년 전 조회 1,235
17년 전 조회 1,997
17년 전 조회 1,166
17년 전 조회 1,869
17년 전 조회 2,161
17년 전 조회 2,976
17년 전 조회 1,252
17년 전 조회 1,344
17년 전 조회 1,571
17년 전 조회 1,233
17년 전 조회 4,370
17년 전 조회 3,912
17년 전 조회 2,802
17년 전 조회 1,602
17년 전 조회 1,347
17년 전 조회 1,616
17년 전 조회 2,533
17년 전 조회 1,746
17년 전 조회 2,032
🐛 버그신고