A

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

· 17년 전 · 2336
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,473
17년 전 조회 1,781
17년 전 조회 1,957
17년 전 조회 2,924
17년 전 조회 2,366
17년 전 조회 2,008
17년 전 조회 4,419
17년 전 조회 3,264
17년 전 조회 1,650
17년 전 조회 3,782
17년 전 조회 3,021
17년 전 조회 2,287
17년 전 조회 1,521
17년 전 조회 2,551
17년 전 조회 2,284
17년 전 조회 2,203
17년 전 조회 2,147
17년 전 조회 1,392
17년 전 조회 2,105
17년 전 조회 3,127
17년 전 조회 1,648
17년 전 조회 1,892
17년 전 조회 1,561
17년 전 조회 1,813
17년 전 조회 1,783
17년 전 조회 1,692
17년 전 조회 2,769
17년 전 조회 2,554
17년 전 조회 2,340
17년 전 조회 1,623
17년 전 조회 2,639
17년 전 조회 4,469
17년 전 조회 2,964
17년 전 조회 1,873
17년 전 조회 2,062
17년 전 조회 3,467
17년 전 조회 2,446
17년 전 조회 4,033
17년 전 조회 1,886
17년 전 조회 2,492
17년 전 조회 2,332
17년 전 조회 1,831
17년 전 조회 2,348
17년 전 조회 2,151
17년 전 조회 2,178
17년 전 조회 3,301
17년 전 조회 2,369
17년 전 조회 1,655
17년 전 조회 1,677
17년 전 조회 2,337
17년 전 조회 3,416
17년 전 조회 2,353
17년 전 조회 1,754
17년 전 조회 4,446
17년 전 조회 2,244
17년 전 조회 3,681
17년 전 조회 6,249
17년 전 조회 1,703
17년 전 조회 1,848
17년 전 조회 1,440
17년 전 조회 1,543
17년 전 조회 3,098
17년 전 조회 2,114
17년 전 조회 2,806
17년 전 조회 1,498
17년 전 조회 3,392
17년 전 조회 2,386
17년 전 조회 2,821
17년 전 조회 1,619
17년 전 조회 1,969
17년 전 조회 1,347
17년 전 조회 1,406
17년 전 조회 1,987
17년 전 조회 1,410
17년 전 조회 4,515
17년 전 조회 1,730
17년 전 조회 2,206
17년 전 조회 7,318
17년 전 조회 1,579
17년 전 조회 2,108
17년 전 조회 3,364
17년 전 조회 1,407
17년 전 조회 2,190
17년 전 조회 1,347
17년 전 조회 2,045
17년 전 조회 2,372
17년 전 조회 3,188
17년 전 조회 1,451
17년 전 조회 1,517
17년 전 조회 1,766
17년 전 조회 1,437
17년 전 조회 4,568
17년 전 조회 4,112
17년 전 조회 3,011
17년 전 조회 1,786
17년 전 조회 1,521
17년 전 조회 1,823
17년 전 조회 2,750
17년 전 조회 1,938
17년 전 조회 2,217