A

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

· 17년 전 · 2257
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,410
17년 전 조회 1,710
17년 전 조회 1,881
17년 전 조회 2,858
17년 전 조회 2,306
17년 전 조회 1,944
17년 전 조회 4,351
17년 전 조회 3,193
17년 전 조회 1,587
17년 전 조회 3,719
17년 전 조회 2,956
17년 전 조회 2,219
17년 전 조회 1,454
17년 전 조회 2,479
17년 전 조회 2,221
17년 전 조회 2,124
17년 전 조회 2,078
17년 전 조회 1,324
17년 전 조회 2,029
17년 전 조회 3,071
17년 전 조회 1,579
17년 전 조회 1,824
17년 전 조회 1,501
17년 전 조회 1,753
17년 전 조회 1,712
17년 전 조회 1,610
17년 전 조회 2,702
17년 전 조회 2,471
17년 전 조회 2,262
17년 전 조회 1,554
17년 전 조회 2,575
17년 전 조회 4,399
17년 전 조회 2,888
17년 전 조회 1,810
17년 전 조회 1,997
17년 전 조회 3,384
17년 전 조회 2,384
17년 전 조회 3,964
17년 전 조회 1,828
17년 전 조회 2,426
17년 전 조회 2,257
17년 전 조회 1,757
17년 전 조회 2,279
17년 전 조회 2,077
17년 전 조회 2,105
17년 전 조회 3,232
17년 전 조회 2,301
17년 전 조회 1,587
17년 전 조회 1,609
17년 전 조회 2,258
17년 전 조회 3,353
17년 전 조회 2,284
17년 전 조회 1,684
17년 전 조회 4,372
17년 전 조회 2,173
17년 전 조회 3,619
17년 전 조회 6,172
17년 전 조회 1,636
17년 전 조회 1,786
17년 전 조회 1,377
17년 전 조회 1,473
17년 전 조회 3,029
17년 전 조회 2,054
17년 전 조회 2,741
17년 전 조회 1,435
17년 전 조회 3,330
17년 전 조회 2,315
17년 전 조회 2,745
17년 전 조회 1,550
17년 전 조회 1,898
17년 전 조회 1,284
17년 전 조회 1,339
17년 전 조회 1,926
17년 전 조회 1,350
17년 전 조회 4,448
17년 전 조회 1,662
17년 전 조회 2,138
17년 전 조회 7,247
17년 전 조회 1,507
17년 전 조회 2,034
17년 전 조회 3,287
17년 전 조회 1,346
17년 전 조회 2,122
17년 전 조회 1,277
17년 전 조회 1,985
17년 전 조회 2,309
17년 전 조회 3,118
17년 전 조회 1,384
17년 전 조회 1,446
17년 전 조회 1,708
17년 전 조회 1,367
17년 전 조회 4,503
17년 전 조회 4,041
17년 전 조회 2,926
17년 전 조회 1,724
17년 전 조회 1,459
17년 전 조회 1,751
17년 전 조회 2,676
17년 전 조회 1,873
17년 전 조회 2,147