A

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

· 17년 전 · 2453
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,596
17년 전 조회 1,900
17년 전 조회 2,096
17년 전 조회 3,052
17년 전 조회 2,497
17년 전 조회 2,145
17년 전 조회 4,556
17년 전 조회 3,372
17년 전 조회 1,784
17년 전 조회 3,907
17년 전 조회 3,161
17년 전 조회 2,400
17년 전 조회 1,659
17년 전 조회 2,678
17년 전 조회 2,404
17년 전 조회 2,338
17년 전 조회 2,279
17년 전 조회 1,514
17년 전 조회 2,209
17년 전 조회 3,261
17년 전 조회 1,762
17년 전 조회 2,021
17년 전 조회 1,690
17년 전 조회 1,925
17년 전 조회 1,909
17년 전 조회 1,813
17년 전 조회 2,900
17년 전 조회 2,664
17년 전 조회 2,454
17년 전 조회 1,750
17년 전 조회 2,777
17년 전 조회 4,587
17년 전 조회 3,071
17년 전 조회 1,998
17년 전 조회 2,191
17년 전 조회 3,595
17년 전 조회 2,584
17년 전 조회 4,149
17년 전 조회 2,003
17년 전 조회 2,595
17년 전 조회 2,436
17년 전 조회 1,957
17년 전 조회 2,463
17년 전 조회 2,270
17년 전 조회 2,303
17년 전 조회 3,421
17년 전 조회 2,483
17년 전 조회 1,770
17년 전 조회 1,787
17년 전 조회 2,454
17년 전 조회 3,536
17년 전 조회 2,454
17년 전 조회 1,876
17년 전 조회 4,583
17년 전 조회 2,360
17년 전 조회 3,792
17년 전 조회 6,365
17년 전 조회 1,826
17년 전 조회 1,988
17년 전 조회 1,560
17년 전 조회 1,679
17년 전 조회 3,206
17년 전 조회 2,241
17년 전 조회 2,903
17년 전 조회 1,624
17년 전 조회 3,509
17년 전 조회 2,491
17년 전 조회 2,928
17년 전 조회 1,742
17년 전 조회 2,087
17년 전 조회 1,471
17년 전 조회 1,521
17년 전 조회 2,104
17년 전 조회 1,531
17년 전 조회 4,622
17년 전 조회 1,834
17년 전 조회 2,323
17년 전 조회 7,422
17년 전 조회 1,694
17년 전 조회 2,233
17년 전 조회 3,468
17년 전 조회 1,535
17년 전 조회 2,297
17년 전 조회 1,456
17년 전 조회 2,151
17년 전 조회 2,477
17년 전 조회 3,289
17년 전 조회 1,570
17년 전 조회 1,638
17년 전 조회 1,872
17년 전 조회 1,551
17년 전 조회 4,689
17년 전 조회 4,215
17년 전 조회 3,130
17년 전 조회 1,914
17년 전 조회 1,651
17년 전 조회 1,914
17년 전 조회 2,849
17년 전 조회 2,052
17년 전 조회 2,325