A

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

· 17년 전 · 2521
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,635
17년 전 조회 1,943
17년 전 조회 2,148
17년 전 조회 3,101
17년 전 조회 2,544
17년 전 조회 2,196
17년 전 조회 4,626
17년 전 조회 3,424
17년 전 조회 1,830
17년 전 조회 3,973
17년 전 조회 3,208
17년 전 조회 2,459
17년 전 조회 1,718
17년 전 조회 2,735
17년 전 조회 2,467
17년 전 조회 2,393
17년 전 조회 2,337
17년 전 조회 1,566
17년 전 조회 2,271
17년 전 조회 3,322
17년 전 조회 1,806
17년 전 조회 2,070
17년 전 조회 1,745
17년 전 조회 1,999
17년 전 조회 1,968
17년 전 조회 1,870
17년 전 조회 2,958
17년 전 조회 2,714
17년 전 조회 2,515
17년 전 조회 1,800
17년 전 조회 2,840
17년 전 조회 4,644
17년 전 조회 3,132
17년 전 조회 2,067
17년 전 조회 2,244
17년 전 조회 3,666
17년 전 조회 2,647
17년 전 조회 4,221
17년 전 조회 2,064
17년 전 조회 2,653
17년 전 조회 2,507
17년 전 조회 2,017
17년 전 조회 2,515
17년 전 조회 2,349
17년 전 조회 2,368
17년 전 조회 3,489
17년 전 조회 2,549
17년 전 조회 1,825
17년 전 조회 1,848
17년 전 조회 2,522
17년 전 조회 3,603
17년 전 조회 2,517
17년 전 조회 1,943
17년 전 조회 4,641
17년 전 조회 2,417
17년 전 조회 3,882
17년 전 조회 6,425
17년 전 조회 1,871
17년 전 조회 2,048
17년 전 조회 1,613
17년 전 조회 1,733
17년 전 조회 3,265
17년 전 조회 2,306
17년 전 조회 2,954
17년 전 조회 1,668
17년 전 조회 3,578
17년 전 조회 2,538
17년 전 조회 2,987
17년 전 조회 1,797
17년 전 조회 2,139
17년 전 조회 1,519
17년 전 조회 1,569
17년 전 조회 2,175
17년 전 조회 1,576
17년 전 조회 4,679
17년 전 조회 1,891
17년 전 조회 2,370
17년 전 조회 7,471
17년 전 조회 1,743
17년 전 조회 2,280
17년 전 조회 3,515
17년 전 조회 1,575
17년 전 조회 2,348
17년 전 조회 1,503
17년 전 조회 2,191
17년 전 조회 2,528
17년 전 조회 3,336
17년 전 조회 1,618
17년 전 조회 1,689
17년 전 조회 1,929
17년 전 조회 1,591
17년 전 조회 4,732
17년 전 조회 4,257
17년 전 조회 3,183
17년 전 조회 1,946
17년 전 조회 1,685
17년 전 조회 1,962
17년 전 조회 2,893
17년 전 조회 2,093
17년 전 조회 2,371