A

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

· 17년 전 · 2293
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,436
17년 전 조회 1,741
17년 전 조회 1,917
17년 전 조회 2,895
17년 전 조회 2,335
17년 전 조회 1,973
17년 전 조회 4,376
17년 전 조회 3,228
17년 전 조회 1,620
17년 전 조회 3,750
17년 전 조회 2,983
17년 전 조회 2,255
17년 전 조회 1,482
17년 전 조회 2,511
17년 전 조회 2,252
17년 전 조회 2,155
17년 전 조회 2,104
17년 전 조회 1,359
17년 전 조회 2,061
17년 전 조회 3,090
17년 전 조회 1,611
17년 전 조회 1,855
17년 전 조회 1,529
17년 전 조회 1,777
17년 전 조회 1,743
17년 전 조회 1,651
17년 전 조회 2,731
17년 전 조회 2,511
17년 전 조회 2,297
17년 전 조회 1,586
17년 전 조회 2,603
17년 전 조회 4,435
17년 전 조회 2,927
17년 전 조회 1,833
17년 전 조회 2,022
17년 전 조회 3,424
17년 전 조회 2,411
17년 전 조회 3,994
17년 전 조회 1,848
17년 전 조회 2,458
17년 전 조회 2,291
17년 전 조회 1,792
17년 전 조회 2,312
17년 전 조회 2,107
17년 전 조회 2,139
17년 전 조회 3,268
17년 전 조회 2,333
17년 전 조회 1,613
17년 전 조회 1,643
17년 전 조회 2,294
17년 전 조회 3,384
17년 전 조회 2,314
17년 전 조회 1,718
17년 전 조회 4,409
17년 전 조회 2,207
17년 전 조회 3,643
17년 전 조회 6,208
17년 전 조회 1,663
17년 전 조회 1,812
17년 전 조회 1,406
17년 전 조회 1,495
17년 전 조회 3,053
17년 전 조회 2,076
17년 전 조회 2,766
17년 전 조회 1,460
17년 전 조회 3,356
17년 전 조회 2,345
17년 전 조회 2,777
17년 전 조회 1,572
17년 전 조회 1,928
17년 전 조회 1,315
17년 전 조회 1,369
17년 전 조회 1,951
17년 전 조회 1,372
17년 전 조회 4,470
17년 전 조회 1,696
17년 전 조회 2,167
17년 전 조회 7,274
17년 전 조회 1,533
17년 전 조회 2,069
17년 전 조회 3,320
17년 전 조회 1,369
17년 전 조회 2,151
17년 전 조회 1,303
17년 전 조회 2,012
17년 전 조회 2,334
17년 전 조회 3,150
17년 전 조회 1,415
17년 전 조회 1,475
17년 전 조회 1,728
17년 전 조회 1,392
17년 전 조회 4,533
17년 전 조회 4,076
17년 전 조회 2,958
17년 전 조회 1,751
17년 전 조회 1,482
17년 전 조회 1,780
17년 전 조회 2,705
17년 전 조회 1,899
17년 전 조회 2,176