A

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

· 17년 전 · 2127
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,246
17년 전 조회 1,548
17년 전 조회 1,726
17년 전 조회 2,717
17년 전 조회 2,143
17년 전 조회 1,795
17년 전 조회 4,200
17년 전 조회 3,047
17년 전 조회 1,442
17년 전 조회 3,572
17년 전 조회 2,800
17년 전 조회 2,078
17년 전 조회 1,298
17년 전 조회 2,335
17년 전 조회 2,070
17년 전 조회 1,982
17년 전 조회 1,926
17년 전 조회 1,178
17년 전 조회 1,882
17년 전 조회 2,936
17년 전 조회 1,436
17년 전 조회 1,676
17년 전 조회 1,358
17년 전 조회 1,605
17년 전 조회 1,580
17년 전 조회 1,453
17년 전 조회 2,564
17년 전 조회 2,329
17년 전 조회 2,108
17년 전 조회 1,417
17년 전 조회 2,433
17년 전 조회 4,254
17년 전 조회 2,740
17년 전 조회 1,663
17년 전 조회 1,857
17년 전 조회 3,235
17년 전 조회 2,236
17년 전 조회 3,832
17년 전 조회 1,681
17년 전 조회 2,275
17년 전 조회 2,103
17년 전 조회 1,621
17년 전 조회 2,134
17년 전 조회 1,931
17년 전 조회 1,968
17년 전 조회 3,078
17년 전 조회 2,153
17년 전 조회 1,442
17년 전 조회 1,465
17년 전 조회 2,128
17년 전 조회 3,206
17년 전 조회 2,144
17년 전 조회 1,537
17년 전 조회 4,239
17년 전 조회 2,030
17년 전 조회 3,461
17년 전 조회 6,034
17년 전 조회 1,488
17년 전 조회 1,656
17년 전 조회 1,240
17년 전 조회 1,353
17년 전 조회 2,876
17년 전 조회 1,913
17년 전 조회 2,596
17년 전 조회 1,306
17년 전 조회 3,184
17년 전 조회 2,164
17년 전 조회 2,603
17년 전 조회 1,410
17년 전 조회 1,756
17년 전 조회 1,153
17년 전 조회 1,207
17년 전 조회 1,781
17년 전 조회 1,230
17년 전 조회 4,308
17년 전 조회 1,506
17년 전 조회 2,006
17년 전 조회 7,091
17년 전 조회 1,383
17년 전 조회 1,898
17년 전 조회 3,131
17년 전 조회 1,226
17년 전 조회 1,985
17년 전 조회 1,158
17년 전 조회 1,858
17년 전 조회 2,152
17년 전 조회 2,966
17년 전 조회 1,244
17년 전 조회 1,334
17년 전 조회 1,563
17년 전 조회 1,227
17년 전 조회 4,360
17년 전 조회 3,904
17년 전 조회 2,792
17년 전 조회 1,593
17년 전 조회 1,337
17년 전 조회 1,606
17년 전 조회 2,523
17년 전 조회 1,740
17년 전 조회 2,024
🐛 버그신고