본문 바로가기

javascript

NC 전용 헤엄치는 물고기

[스크립트]

        <SCRIPT>

        function showForm() {
            document.waiting.visibility="hide";
            document.formlayer.visibility="show";
            return false;
        }
        <!-- Simple move function -->
        function movefish() {

                var fish = document.fish;
                if (fish.left < 400) {
                        fish.offset(5, 0);}
                else {fish.left = 10;}

                setTimeout("movefish()", 10);
                return;
        }


</SCRIPT>

        <BODY BGCOLOR="#FFFFFF" ONLOAD="showForm();">

        <LAYER NAME="bluepole" LEFT=160 TOP=150>
        <IMG SRC=http://developer.netscape.com/library/documentation/communicator/dynhtml/images/bluepole.gif>
        </LAYER>

        <LAYER NAME="greenpole" LEFT=360 TOP=150>
        <IMG SRC=http://developer.netscape.com/library/documentation/communicator/dynhtml/images/greenpol.gif>
        </LAYER>

        <LAYER NAME="redpole" LEFT=260 TOP=150>
        <IMG SRC=http://developer.netscape.com/library/documentation/communicator/dynhtml/images/redpole.gif>
        </LAYER>

        <LAYER NAME="fish" LEFT=40 TOP=170  ABOVE="redpole">
        <IMG SRC=http://developer.netscape.com/library/documentation/communicator/dynhtml/images/fish1.gif >
        </LAYER>

    <H1>헤엄치는 물고기</H1>
<hr>
    <ILAYER ID=formlayer VISIBILITY=HIDE>
        <FORM>
        <INPUT type=button value="고기야 한번 놀아볼래 ?"
        OnClick="movefish(); return false;">
        </FORM>
        </LAYER>

        <LAYER ID=waiting TOP=100 LEFT=50>
        <H3>물고기 나올때 까지 잠시만 기다려주세요</H3>
        </LAYER>
<hr>