A

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

· 17년 전 · 2463
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,602
17년 전 조회 1,911
17년 전 조회 2,104
17년 전 조회 3,063
17년 전 조회 2,510
17년 전 조회 2,155
17년 전 조회 4,575
17년 전 조회 3,383
17년 전 조회 1,794
17년 전 조회 3,922
17년 전 조회 3,172
17년 전 조회 2,409
17년 전 조회 1,672
17년 전 조회 2,686
17년 전 조회 2,410
17년 전 조회 2,353
17년 전 조회 2,294
17년 전 조회 1,526
17년 전 조회 2,227
17년 전 조회 3,274
17년 전 조회 1,767
17년 전 조회 2,027
17년 전 조회 1,696
17년 전 조회 1,947
17년 전 조회 1,920
17년 전 조회 1,820
17년 전 조회 2,909
17년 전 조회 2,671
17년 전 조회 2,464
17년 전 조회 1,758
17년 전 조회 2,790
17년 전 조회 4,596
17년 전 조회 3,084
17년 전 조회 2,012
17년 전 조회 2,194
17년 전 조회 3,607
17년 전 조회 2,600
17년 전 조회 4,162
17년 전 조회 2,009
17년 전 조회 2,606
17년 전 조회 2,446
17년 전 조회 1,965
17년 전 조회 2,468
17년 전 조회 2,286
17년 전 조회 2,319
17년 전 조회 3,433
17년 전 조회 2,499
17년 전 조회 1,778
17년 전 조회 1,802
17년 전 조회 2,464
17년 전 조회 3,549
17년 전 조회 2,466
17년 전 조회 1,886
17년 전 조회 4,587
17년 전 조회 2,372
17년 전 조회 3,808
17년 전 조회 6,380
17년 전 조회 1,838
17년 전 조회 1,997
17년 전 조회 1,570
17년 전 조회 1,691
17년 전 조회 3,216
17년 전 조회 2,260
17년 전 조회 2,913
17년 전 조회 1,633
17년 전 조회 3,527
17년 전 조회 2,500
17년 전 조회 2,945
17년 전 조회 1,754
17년 전 조회 2,102
17년 전 조회 1,481
17년 전 조회 1,530
17년 전 조회 2,121
17년 전 조회 1,537
17년 전 조회 4,634
17년 전 조회 1,849
17년 전 조회 2,336
17년 전 조회 7,435
17년 전 조회 1,703
17년 전 조회 2,243
17년 전 조회 3,479
17년 전 조회 1,543
17년 전 조회 2,311
17년 전 조회 1,465
17년 전 조회 2,159
17년 전 조회 2,494
17년 전 조회 3,297
17년 전 조회 1,578
17년 전 조회 1,652
17년 전 조회 1,886
17년 전 조회 1,557
17년 전 조회 4,695
17년 전 조회 4,225
17년 전 조회 3,143
17년 전 조회 1,919
17년 전 조회 1,660
17년 전 조회 1,925
17년 전 조회 2,857
17년 전 조회 2,060
17년 전 조회 2,331