A

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

· 17년 전 · 2309
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,452
17년 전 조회 1,763
17년 전 조회 1,934
17년 전 조회 2,905
17년 전 조회 2,353
17년 전 조회 1,985
17년 전 조회 4,393
17년 전 조회 3,240
17년 전 조회 1,630
17년 전 조회 3,762
17년 전 조회 2,999
17년 전 조회 2,272
17년 전 조회 1,495
17년 전 조회 2,529
17년 전 조회 2,261
17년 전 조회 2,177
17년 전 조회 2,120
17년 전 조회 1,375
17년 전 조회 2,080
17년 전 조회 3,109
17년 전 조회 1,631
17년 전 조회 1,871
17년 전 조회 1,543
17년 전 조회 1,795
17년 전 조회 1,762
17년 전 조회 1,669
17년 전 조회 2,747
17년 전 조회 2,532
17년 전 조회 2,312
17년 전 조회 1,603
17년 전 조회 2,621
17년 전 조회 4,458
17년 전 조회 2,944
17년 전 조회 1,853
17년 전 조회 2,039
17년 전 조회 3,445
17년 전 조회 2,427
17년 전 조회 4,012
17년 전 조회 1,865
17년 전 조회 2,474
17년 전 조회 2,310
17년 전 조회 1,808
17년 전 조회 2,327
17년 전 조회 2,129
17년 전 조회 2,160
17년 전 조회 3,284
17년 전 조회 2,347
17년 전 조회 1,632
17년 전 조회 1,656
17년 전 조회 2,310
17년 전 조회 3,402
17년 전 조회 2,333
17년 전 조회 1,734
17년 전 조회 4,427
17년 전 조회 2,227
17년 전 조회 3,665
17년 전 조회 6,224
17년 전 조회 1,682
17년 전 조회 1,833
17년 전 조회 1,428
17년 전 조회 1,518
17년 전 조회 3,071
17년 전 조회 2,095
17년 전 조회 2,789
17년 전 조회 1,477
17년 전 조회 3,370
17년 전 조회 2,363
17년 전 조회 2,796
17년 전 조회 1,596
17년 전 조회 1,944
17년 전 조회 1,329
17년 전 조회 1,384
17년 전 조회 1,965
17년 전 조회 1,390
17년 전 조회 4,494
17년 전 조회 1,711
17년 전 조회 2,179
17년 전 조회 7,301
17년 전 조회 1,556
17년 전 조회 2,087
17년 전 조회 3,339
17년 전 조회 1,388
17년 전 조회 2,165
17년 전 조회 1,323
17년 전 조회 2,035
17년 전 조회 2,354
17년 전 조회 3,166
17년 전 조회 1,431
17년 전 조회 1,496
17년 전 조회 1,744
17년 전 조회 1,415
17년 전 조회 4,547
17년 전 조회 4,092
17년 전 조회 2,982
17년 전 조회 1,766
17년 전 조회 1,506
17년 전 조회 1,800
17년 전 조회 2,729
17년 전 조회 1,918
17년 전 조회 2,192