A

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

· 17년 전 · 2319
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,457
17년 전 조회 1,767
17년 전 조회 1,940
17년 전 조회 2,909
17년 전 조회 2,355
17년 전 조회 1,997
17년 전 조회 4,398
17년 전 조회 3,244
17년 전 조회 1,636
17년 전 조회 3,768
17년 전 조회 3,005
17년 전 조회 2,275
17년 전 조회 1,503
17년 전 조회 2,538
17년 전 조회 2,268
17년 전 조회 2,182
17년 전 조회 2,128
17년 전 조회 1,380
17년 전 조회 2,086
17년 전 조회 3,114
17년 전 조회 1,637
17년 전 조회 1,876
17년 전 조회 1,547
17년 전 조회 1,799
17년 전 조회 1,766
17년 전 조회 1,677
17년 전 조회 2,754
17년 전 조회 2,539
17년 전 조회 2,320
17년 전 조회 1,610
17년 전 조회 2,630
17년 전 조회 4,459
17년 전 조회 2,950
17년 전 조회 1,859
17년 전 조회 2,046
17년 전 조회 3,454
17년 전 조회 2,435
17년 전 조회 4,020
17년 전 조회 1,871
17년 전 조회 2,479
17년 전 조회 2,314
17년 전 조회 1,814
17년 전 조회 2,334
17년 전 조회 2,136
17년 전 조회 2,165
17년 전 조회 3,291
17년 전 조회 2,354
17년 전 조회 1,638
17년 전 조회 1,663
17년 전 조회 2,320
17년 전 조회 3,408
17년 전 조회 2,340
17년 전 조회 1,737
17년 전 조회 4,434
17년 전 조회 2,234
17년 전 조회 3,671
17년 전 조회 6,231
17년 전 조회 1,686
17년 전 조회 1,837
17년 전 조회 1,431
17년 전 조회 1,523
17년 전 조회 3,079
17년 전 조회 2,101
17년 전 조회 2,792
17년 전 조회 1,486
17년 전 조회 3,375
17년 전 조회 2,368
17년 전 조회 2,801
17년 전 조회 1,600
17년 전 조회 1,952
17년 전 조회 1,333
17년 전 조회 1,393
17년 전 조회 1,969
17년 전 조회 1,401
17년 전 조회 4,500
17년 전 조회 1,715
17년 전 조회 2,192
17년 전 조회 7,307
17년 전 조회 1,565
17년 전 조회 2,091
17년 전 조회 3,347
17년 전 조회 1,394
17년 전 조회 2,173
17년 전 조회 1,331
17년 전 조회 2,037
17년 전 조회 2,360
17년 전 조회 3,173
17년 전 조회 1,435
17년 전 조회 1,501
17년 전 조회 1,754
17년 전 조회 1,420
17년 전 조회 4,555
17년 전 조회 4,097
17년 전 조회 2,992
17년 전 조회 1,773
17년 전 조회 1,512
17년 전 조회 1,801
17년 전 조회 2,731
17년 전 조회 1,923
17년 전 조회 2,199