A

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

· 17년 전 · 2450
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,593
17년 전 조회 1,895
17년 전 조회 2,092
17년 전 조회 3,047
17년 전 조회 2,491
17년 전 조회 2,138
17년 전 조회 4,549
17년 전 조회 3,362
17년 전 조회 1,773
17년 전 조회 3,902
17년 전 조회 3,154
17년 전 조회 2,392
17년 전 조회 1,649
17년 전 조회 2,675
17년 전 조회 2,399
17년 전 조회 2,331
17년 전 조회 2,269
17년 전 조회 1,506
17년 전 조회 2,203
17년 전 조회 3,261
17년 전 조회 1,757
17년 전 조회 2,014
17년 전 조회 1,687
17년 전 조회 1,921
17년 전 조회 1,905
17년 전 조회 1,809
17년 전 조회 2,897
17년 전 조회 2,661
17년 전 조회 2,451
17년 전 조회 1,744
17년 전 조회 2,775
17년 전 조회 4,579
17년 전 조회 3,068
17년 전 조회 1,990
17년 전 조회 2,188
17년 전 조회 3,590
17년 전 조회 2,581
17년 전 조회 4,147
17년 전 조회 1,997
17년 전 조회 2,592
17년 전 조회 2,434
17년 전 조회 1,952
17년 전 조회 2,456
17년 전 조회 2,263
17년 전 조회 2,299
17년 전 조회 3,417
17년 전 조회 2,478
17년 전 조회 1,766
17년 전 조회 1,782
17년 전 조회 2,451
17년 전 조회 3,533
17년 전 조회 2,450
17년 전 조회 1,874
17년 전 조회 4,579
17년 전 조회 2,356
17년 전 조회 3,788
17년 전 조회 6,364
17년 전 조회 1,825
17년 전 조회 1,982
17년 전 조회 1,555
17년 전 조회 1,675
17년 전 조회 3,203
17년 전 조회 2,237
17년 전 조회 2,899
17년 전 조회 1,621
17년 전 조회 3,503
17년 전 조회 2,488
17년 전 조회 2,927
17년 전 조회 1,737
17년 전 조회 2,085
17년 전 조회 1,468
17년 전 조회 1,518
17년 전 조회 2,098
17년 전 조회 1,526
17년 전 조회 4,618
17년 전 조회 1,829
17년 전 조회 2,319
17년 전 조회 7,418
17년 전 조회 1,692
17년 전 조회 2,227
17년 전 조회 3,462
17년 전 조회 1,533
17년 전 조회 2,296
17년 전 조회 1,455
17년 전 조회 2,149
17년 전 조회 2,471
17년 전 조회 3,284
17년 전 조회 1,566
17년 전 조회 1,637
17년 전 조회 1,867
17년 전 조회 1,548
17년 전 조회 4,686
17년 전 조회 4,211
17년 전 조회 3,126
17년 전 조회 1,911
17년 전 조회 1,649
17년 전 조회 1,912
17년 전 조회 2,845
17년 전 조회 2,046
17년 전 조회 2,323