A

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

· 17년 전 · 2274
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,422
17년 전 조회 1,727
17년 전 조회 1,895
17년 전 조회 2,874
17년 전 조회 2,319
17년 전 조회 1,956
17년 전 조회 4,360
17년 전 조회 3,207
17년 전 조회 1,598
17년 전 조회 3,732
17년 전 조회 2,968
17년 전 조회 2,236
17년 전 조회 1,465
17년 전 조회 2,493
17년 전 조회 2,229
17년 전 조회 2,137
17년 전 조회 2,091
17년 전 조회 1,335
17년 전 조회 2,044
17년 전 조회 3,076
17년 전 조회 1,596
17년 전 조회 1,838
17년 전 조회 1,510
17년 전 조회 1,764
17년 전 조회 1,726
17년 전 조회 1,630
17년 전 조회 2,717
17년 전 조회 2,480
17년 전 조회 2,277
17년 전 조회 1,571
17년 전 조회 2,586
17년 전 조회 4,415
17년 전 조회 2,907
17년 전 조회 1,818
17년 전 조회 2,009
17년 전 조회 3,399
17년 전 조회 2,397
17년 전 조회 3,976
17년 전 조회 1,833
17년 전 조회 2,438
17년 전 조회 2,268
17년 전 조회 1,776
17년 전 조회 2,294
17년 전 조회 2,088
17년 전 조회 2,115
17년 전 조회 3,247
17년 전 조회 2,311
17년 전 조회 1,598
17년 전 조회 1,626
17년 전 조회 2,275
17년 전 조회 3,363
17년 전 조회 2,298
17년 전 조회 1,691
17년 전 조회 4,390
17년 전 조회 2,188
17년 전 조회 3,629
17년 전 조회 6,192
17년 전 조회 1,644
17년 전 조회 1,794
17년 전 조회 1,390
17년 전 조회 1,484
17년 전 조회 3,043
17년 전 조회 2,062
17년 전 조회 2,753
17년 전 조회 1,444
17년 전 조회 3,345
17년 전 조회 2,332
17년 전 조회 2,756
17년 전 조회 1,559
17년 전 조회 1,911
17년 전 조회 1,293
17년 전 조회 1,350
17년 전 조회 1,937
17년 전 조회 1,363
17년 전 조회 4,456
17년 전 조회 1,678
17년 전 조회 2,151
17년 전 조회 7,264
17년 전 조회 1,517
17년 전 조회 2,050
17년 전 조회 3,301
17년 전 조회 1,357
17년 전 조회 2,135
17년 전 조회 1,294
17년 전 조회 1,999
17년 전 조회 2,320
17년 전 조회 3,130
17년 전 조회 1,397
17년 전 조회 1,457
17년 전 조회 1,715
17년 전 조회 1,380
17년 전 조회 4,516
17년 전 조회 4,059
17년 전 조회 2,936
17년 전 조회 1,736
17년 전 조회 1,473
17년 전 조회 1,760
17년 전 조회 2,689
17년 전 조회 1,887
17년 전 조회 2,160