A

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

· 17년 전 · 2125
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,243
17년 전 조회 1,547
17년 전 조회 1,719
17년 전 조회 2,715
17년 전 조회 2,137
17년 전 조회 1,791
17년 전 조회 4,194
17년 전 조회 3,043
17년 전 조회 1,435
17년 전 조회 3,567
17년 전 조회 2,796
17년 전 조회 2,077
17년 전 조회 1,292
17년 전 조회 2,328
17년 전 조회 2,065
17년 전 조회 1,978
17년 전 조회 1,921
17년 전 조회 1,173
17년 전 조회 1,876
17년 전 조회 2,931
17년 전 조회 1,431
17년 전 조회 1,672
17년 전 조회 1,353
17년 전 조회 1,601
17년 전 조회 1,575
17년 전 조회 1,446
17년 전 조회 2,560
17년 전 조회 2,324
17년 전 조회 2,105
17년 전 조회 1,414
17년 전 조회 2,427
17년 전 조회 4,249
17년 전 조회 2,739
17년 전 조회 1,659
17년 전 조회 1,853
17년 전 조회 3,230
17년 전 조회 2,231
17년 전 조회 3,826
17년 전 조회 1,674
17년 전 조회 2,270
17년 전 조회 2,100
17년 전 조회 1,615
17년 전 조회 2,130
17년 전 조회 1,926
17년 전 조회 1,962
17년 전 조회 3,075
17년 전 조회 2,149
17년 전 조회 1,437
17년 전 조회 1,461
17년 전 조회 2,126
17년 전 조회 3,203
17년 전 조회 2,139
17년 전 조회 1,531
17년 전 조회 4,236
17년 전 조회 2,025
17년 전 조회 3,457
17년 전 조회 6,032
17년 전 조회 1,484
17년 전 조회 1,654
17년 전 조회 1,236
17년 전 조회 1,348
17년 전 조회 2,870
17년 전 조회 1,907
17년 전 조회 2,592
17년 전 조회 1,301
17년 전 조회 3,178
17년 전 조회 2,160
17년 전 조회 2,603
17년 전 조회 1,405
17년 전 조회 1,754
17년 전 조회 1,150
17년 전 조회 1,206
17년 전 조회 1,778
17년 전 조회 1,224
17년 전 조회 4,304
17년 전 조회 1,501
17년 전 조회 2,002
17년 전 조회 7,089
17년 전 조회 1,378
17년 전 조회 1,895
17년 전 조회 3,125
17년 전 조회 1,223
17년 전 조회 1,982
17년 전 조회 1,155
17년 전 조회 1,852
17년 전 조회 2,150
17년 전 조회 2,961
17년 전 조회 1,240
17년 전 조회 1,329
17년 전 조회 1,556
17년 전 조회 1,224
17년 전 조회 4,355
17년 전 조회 3,898
17년 전 조회 2,787
17년 전 조회 1,590
17년 전 조회 1,335
17년 전 조회 1,603
17년 전 조회 2,520
17년 전 조회 1,734
17년 전 조회 2,017
🐛 버그신고