A

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

· 17년 전 · 2137
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,559
17년 전 조회 1,732
17년 전 조회 2,726
17년 전 조회 2,152
17년 전 조회 1,804
17년 전 조회 4,209
17년 전 조회 3,056
17년 전 조회 1,448
17년 전 조회 3,579
17년 전 조회 2,810
17년 전 조회 2,088
17년 전 조회 1,306
17년 전 조회 2,346
17년 전 조회 2,080
17년 전 조회 1,992
17년 전 조회 1,938
17년 전 조회 1,188
17년 전 조회 1,892
17년 전 조회 2,946
17년 전 조회 1,445
17년 전 조회 1,685
17년 전 조회 1,370
17년 전 조회 1,615
17년 전 조회 1,589
17년 전 조회 1,463
17년 전 조회 2,573
17년 전 조회 2,338
17년 전 조회 2,117
17년 전 조회 1,430
17년 전 조회 2,444
17년 전 조회 4,263
17년 전 조회 2,747
17년 전 조회 1,672
17년 전 조회 1,866
17년 전 조회 3,245
17년 전 조회 2,250
17년 전 조회 3,841
17년 전 조회 1,692
17년 전 조회 2,282
17년 전 조회 2,114
17년 전 조회 1,629
17년 전 조회 2,145
17년 전 조회 1,943
17년 전 조회 1,976
17년 전 조회 3,086
17년 전 조회 2,160
17년 전 조회 1,451
17년 전 조회 1,474
17년 전 조회 2,138
17년 전 조회 3,215
17년 전 조회 2,153
17년 전 조회 1,545
17년 전 조회 4,248
17년 전 조회 2,037
17년 전 조회 3,470
17년 전 조회 6,042
17년 전 조회 1,500
17년 전 조회 1,669
17년 전 조회 1,250
17년 전 조회 1,363
17년 전 조회 2,886
17년 전 조회 1,920
17년 전 조회 2,604
17년 전 조회 1,312
17년 전 조회 3,192
17년 전 조회 2,174
17년 전 조회 2,616
17년 전 조회 1,417
17년 전 조회 1,764
17년 전 조회 1,163
17년 전 조회 1,215
17년 전 조회 1,792
17년 전 조회 1,238
17년 전 조회 4,321
17년 전 조회 1,518
17년 전 조회 2,015
17년 전 조회 7,100
17년 전 조회 1,393
17년 전 조회 1,910
17년 전 조회 3,138
17년 전 조회 1,235
17년 전 조회 1,997
17년 전 조회 1,166
17년 전 조회 1,869
17년 전 조회 2,162
17년 전 조회 2,978
17년 전 조회 1,253
17년 전 조회 1,345
17년 전 조회 1,572
17년 전 조회 1,234
17년 전 조회 4,370
17년 전 조회 3,912
17년 전 조회 2,803
17년 전 조회 1,603
17년 전 조회 1,347
17년 전 조회 1,616
17년 전 조회 2,533
17년 전 조회 1,746
17년 전 조회 2,034
🐛 버그신고