A

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

· 17년 전 · 2124
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,240
17년 전 조회 1,546
17년 전 조회 1,718
17년 전 조회 2,712
17년 전 조회 2,136
17년 전 조회 1,790
17년 전 조회 4,193
17년 전 조회 3,041
17년 전 조회 1,433
17년 전 조회 3,565
17년 전 조회 2,795
17년 전 조회 2,075
17년 전 조회 1,291
17년 전 조회 2,325
17년 전 조회 2,064
17년 전 조회 1,977
17년 전 조회 1,921
17년 전 조회 1,171
17년 전 조회 1,875
17년 전 조회 2,929
17년 전 조회 1,430
17년 전 조회 1,671
17년 전 조회 1,352
17년 전 조회 1,599
17년 전 조회 1,572
17년 전 조회 1,445
17년 전 조회 2,558
17년 전 조회 2,323
17년 전 조회 2,103
17년 전 조회 1,412
17년 전 조회 2,426
17년 전 조회 4,248
17년 전 조회 2,737
17년 전 조회 1,657
17년 전 조회 1,851
17년 전 조회 3,229
17년 전 조회 2,231
17년 전 조회 3,824
17년 전 조회 1,673
17년 전 조회 2,270
17년 전 조회 2,098
17년 전 조회 1,614
17년 전 조회 2,128
17년 전 조회 1,926
17년 전 조회 1,961
17년 전 조회 3,073
17년 전 조회 2,147
17년 전 조회 1,436
17년 전 조회 1,458
17년 전 조회 2,125
17년 전 조회 3,201
17년 전 조회 2,137
17년 전 조회 1,529
17년 전 조회 4,236
17년 전 조회 2,024
17년 전 조회 3,457
17년 전 조회 6,031
17년 전 조회 1,483
17년 전 조회 1,653
17년 전 조회 1,234
17년 전 조회 1,345
17년 전 조회 2,869
17년 전 조회 1,905
17년 전 조회 2,591
17년 전 조회 1,300
17년 전 조회 3,177
17년 전 조회 2,160
17년 전 조회 2,600
17년 전 조회 1,404
17년 전 조회 1,753
17년 전 조회 1,149
17년 전 조회 1,205
17년 전 조회 1,777
17년 전 조회 1,223
17년 전 조회 4,304
17년 전 조회 1,500
17년 전 조회 2,001
17년 전 조회 7,089
17년 전 조회 1,378
17년 전 조회 1,895
17년 전 조회 3,125
17년 전 조회 1,223
17년 전 조회 1,981
17년 전 조회 1,154
17년 전 조회 1,851
17년 전 조회 2,149
17년 전 조회 2,961
17년 전 조회 1,239
17년 전 조회 1,329
17년 전 조회 1,555
17년 전 조회 1,222
17년 전 조회 4,355
17년 전 조회 3,897
17년 전 조회 2,785
17년 전 조회 1,588
17년 전 조회 1,334
17년 전 조회 1,602
17년 전 조회 2,518
17년 전 조회 1,732
17년 전 조회 2,017
🐛 버그신고