웹마스터 팁

대략 5시간동안 안 돌아가는 머리 강제로 태엽 감으면서 만든 소스입니다-_-;;;

중간에 소스 하나는 모를 곳에서 가져왔는데 어떤 분의 것인지 모르겠네요-_-;;;

그리 쓰일 곳은 없을 겁니다;;;

하지만 사용하실 분은 사용해주세요;ㅁ;/

예제 : http://zective.com/WinJS.html

----------------------------------------------------------------------------------------------------

<html>
<title>Windows In JavaScript (Test Ver.)</title>
<head>
<style>
div {position:absolute; font-size:8px; font-family:Tahoma; z-index:2; text-align:center;}
button {font-size:14px; font-family:Tahoma; background:gray; border:0 solid #333333; color:white; font-weight:normal; width:22;}
</style>
<script>

        // Windows In JavaScript (Test Ver.)
        // This source is created by Zective (http://zective.com)
        // Div 태그와 Table 태그 그리고 JavaScript 를 이용하여 윈도우 구조 비슷하게 나타내기 위한 스크립트

        D_curX = D_curY = 0;
        D_now = null;
        D_prev = null;
        D_1stmv = 1;
        lrs = null;
        dtm = null;
        stm = null;

        document.onmouseup = FinishDrag;

        function FinishDrag() {
                if(document.onmousemove == OnDragMove) {
                        if(D_now.style.pixelLeft < 0) D_now.style.pixelLeft = 1;
                        if(D_now.style.pixelTop < 0) D_now.style.pixelTop = 1;
                        
                        /*
                        l = document.body.clientWidth - D_now.style.pixelWidth;
                        l = document.body.clientHeight-D_now.style.pixelHeight;
                        */

                }

                if(document.onmousemove == OnResizeMove) lrs.Finish();
                document.onmousemove = null;
                D_now = null;
        }

        function BeginDragging(lyr) {
                D_now = lyr;
                D_1stmv = 1;
                document.onmousemove = OnDragMove;
        }

        function OnDragMove() {
                if(D_now == null) return true;
                if(D_1stmv) {
                        D_curX = event.clientX;
                        D_curY = event.clientY;
                        D_1stmv = 0;
                        if(D_prev != D_now) D_now.style.zIndex = D_now.style.zIndex + 1;
                        D_prev = D_now;
                        return false;
                }
                D_now.style.pixelLeft += (event.clientX - D_curX);
                D_now.style.pixelTop += (event.clientY - D_curY);
                D_curX = event.clientX;
                D_curY = event.clientY;
                event.returnValue = false;
        }

        function diOnMouseDown(i) {
                if(event.button == 1) BeginDragging(i);
                event.returnValue = false;
        }

        function OnResizeMove() {
                if(D_1stmv) {
                        D_curX = event.clientX;
                        D_curY = event.clientY;
                        D_1stmv = 0;
                        return false;
                }
                lrs.AddSize(event.clientX - D_curX, event.clientY - D_curY);
                D_curX = event.clientX;
                D_curY = event.clientY;
                event.returnValue = false;
        }

        function resize1(_child, _ream, _tream, _wmax, _hmax) {

                var tream, wlream, hlream, wmax, hmax;

                tream = _ream + 1;
                wlream = _ream + 1;
                hlream = _ream - 4;

                wmax = _wmax - wlream;
                hmax = _hmax - hlream;

                cele = eval("document.all."+_child+".style");
                cele1 = parseInt(cele.width);
                cele2 = parseInt(cele.height);

                hidele = eval("document.all."+_child+"c.style");
                hidele.display = 'block';

                if(cele1 < _wmax) {
                        cele.width = cele1 + _ream;
                        play1 = setInterval("resize1('"+_child+"',"+_ream+","+_tream+","+_wmax+","+_hmax+")" , 0);
                } else if(cele2 < _hmax) {
                        cele.height = cele2 + _ream;
                        play1 = setInterval("resize1('"+_child+"',"+_ream+","+_tream+","+_wmax+","+_hmax+")" , 0);
                } else if(cele1 >= wmax && cele2 >= hmax) {
                        clearInterval();
                } else {
                        cele.width = cele1;
                        cele.height = cele2;
                        clearInterval(play1);
                }
        }

        function resize2(_child, _ream, _tream, _wmin, _hmin) {

                var tream;

                tream = _ream + 1;

                cele = eval("document.all."+_child+".style");
                cele1 = parseInt(cele.width);
                cele2 = parseInt(cele.height);

                hidele = eval("document.all."+_child+"c.style");

                if(cele2 > _hmin) {
                        cele.height = cele2 - _ream;
                        play2 = setInterval("resize2('"+_child+"',"+_ream+","+_tream+","+_wmin+","+_hmin+")" , 0);
                } else if(cele1 > _wmin) {
                        cele.width = cele1 - _ream;
                        play2 = setInterval("resize2('"+_child+"',"+_ream+","+_tream+","+_wmin+","+_hmin+")" , 0);
                } else if(cele1 <= _wmin && cele2 <= _hmin) {
                        clearInterval();
                        hidele.display = 'none';
                } else {
                        cele.width = cele1;
                        cele.height = cele2;
                        clearInterval(play2);
                }
        }

        function DoExit(_obj, _order) {
                dele = eval("document.all."+_obj+".style");
                if(_order == 0) {
                        dele.display = 'block';
                } else {
                        dele.display = 'none';
                }
        }

</script>
</head>

<body bgcolor="white">

<div id="parent1" style="left:230; top:150; text-align:right; display:none; z-index:99;" oncontextmenu="return false;">
<table id="child1" onmousedown="diOnMouseDown(parent1)" cellspacing="0" cellpadding="0" border="0" style="border:1 solid black; width:250px; height:19px; left:0; top:0; background:#999999; cursor:move;">
        <tr height="21">
                <td style="font size:11px Tahamo;" valign="middle">
                         <b>Title</b>
                </td>
                <td align="right" valign="top">
                        <button onclick="resize2('child1', 4, 2, 250, 22);" style="height:21; vertical-align:top;">_</button>
                        <button onclick="resize1('child1', 4, 2, 500, 200);" style="height:21; vertical-align:top;">▣</button>
                        <button onclick="DoExit('parent1', 1);" style="height:21; vertical-align:top;">X</button>
                </td>
        </tr>
        <tr height="1" bgcolor="black">
                <td colspan="2">
                </td>
        </tr>
        <tr id="child1c" style="display:none; background:white;" valign="top">
                <td colspan="2" style="font size:11px Tahamo;">
                        <table cellspacing="1" cellpadding="1" border="0" align="left">
                                <tr>
                                        <td style="font size:12px 굴림; color:black;">
                                                후훗...-_-;;;;
                                                <br>
                                                테스트입니다-_-;
                                        </td>
                                </tr>
                        </table>
                </td>
        </tr>
</table>
</div>

<div id="link1" style="left:500; top:230;" onmousedown="diOnMouseDown(link1)" oncontextmenu="return false;">
<a title="ZecWindows Open (Double Click!)" href="javascript:;" ondblclick="DoExit('parent1', 0);" onfocus="this.blur();" style="text-align:center; width:52; font size:11px Tahoma; border:1 solid black; text-decoration:none;"><font style="font size:30px;"><b>W</b></font><br><b>ZecWin</b></a>
</div>

</body>

</html>
제목 글쓴이 날짜
들어갈때 시작페이지 설정하는거... [2] 쉿!비밀 2003.12.17
소스보기를 일부 차단하는 방법입니다. [12] Juny. 2003.12.12
오른버튼 누를때 메뉴 뜨게하기(깔끔버전) [5] file 2003.12.09
소스연구1 테이블 자동으로 늘었다 커지기 태클환영 [9] 박한웅 2003.12.04
크리스마스 날짜 카운터 [1] keymove 2003.12.04
익스플로러에서 인쇄 누르면 페이지 이동.... [3] 조한웅 2003.11.28
3D 효과의 원형 거울을 띄우자. [6] 줄리앙 2003.11.21
팝업공지창 다시 안뜨게 하는 소스[날짜지정가능] [17] lemin 2003.11.20
자바로 만들어진 계산기 [1] 현규웅 2003.11.20
동영상 오른쪽 버튼 방지 소스 입니다... [9] 김성목 2003.11.15
플래시느낌의 유동적인 메뉴 [9] jabusim 2003.11.13
심플한 원단위를 콤마로 나타내주기 [2] zentoo.com 2003.11.11
날짜카운터 숫자로만 입력하자. [3] TechnoKevin™ 2003.11.08
정말 멋있는 글자 변환 스크립트 [12] sythesis 2003.11.07
자바스크립트로 작성한 그림맞추기 퍼즐게임 [2] 김별 2003.11.05
자바스크립트로 윈도우 흉내내기 (?) [15] 뒹굴리스트 2003.11.03
마우스 이벤트 발생시 문서 상,하단으로 이동 [3] RedEye(kaist) 2003.10.30
클릭하면 홈페이지를 시작페이지로 하는 소스... [7] 젤군 2003.10.28
식대 계산기... ^^ [3] 김주형 2003.10.27
더 이상의 필터링은 없다!!! [10] 미친개 2003.10.26