JavaScript窗体打开特效

右侧出现旋转打开:

   <script type ="text/javascript">
        window.scrollBy(0, 100)
        window.resizeTo(0, 0)
        window.moveTo(0, 0)
        setTimeout("move()", 1);
        var mxm = 50
        var mym = 25
        var mx = 0
        var my = 0
        var sv = 50
        var status = 1
        var szx = 0
        var szy = 0
        var c = 255
        var n = 0
        var sm = 30
        var cycle = 2
        var done = 2
        function move() {
            if (status == 1) {
                mxm = mxm / 1.05
                mym = mym / 1.05
                mx = mx + mxm
                my = my - mym
                mxm = mxm + (2000 - mx) / 100   //设置转动幅度X
                mym = mym - (300 - my) / 100
                window.moveTo(mx, my)
                rmxm = Math.round(mxm / 10)
                rmym = Math.round(mym / 10)
                if (rmxm == 0) {
                    if (rmym == 0) {
                        status = 2
                    }
                }
            }
            if (status == 2) {
                sv = sv / 1.009  //1.0
                scrratio = 1 + 1 / 3
                mx = mx - sv * scrratio / 2
                my = my - sv / 2
                szx = szx + sv * scrratio
                szy = szy + sv

                if (mx > 419 && my > -1007) {
                    //alert(mx + "," + my)
                    window.moveTo(mx, my)
                    window.resizeTo(szx, szy)
                    if (sv < 0.1) {
                        status = 3
                    }
                }
                else {
                    return;
                }
             
            }
            if (status == 3) {
                c = c - 16
                if (c < 0)
                { status = 8 }
            }
            if (status == 4) {
                c = c + 16
                if (c > 239)
                { status = 5 }
            }
            if (status == 5) {
                c = c - 16
                if (c < 0) {
                    status = 6
                    cycle = cycle - 1
                    if (cycle > 0) {
                        if (done == 1)
                        { status = 7 }
                        else
                        { status = 4 }
                    }
                }
            }
            if (status == 6) {
                document.title = ""
                alert("")
                cycle = 2
                status = 4
                done = 1
            }
            if (status == 7) {
                c = c + 4
                if (c > 128)
                { status = 8 }
            }
            if (status == 8) {
            }
            var timer = setTimeout("move()", 0.01)
        }   
    </script>

====================================================

中间出现旋转打开:

  <script type="text/javascript">
        window.scrollBy(0, 100)
        window.resizeTo(0, 0)
        window.moveTo(0, 0)    
        setTimeout("move()", 1);
        var mxm = 50
        var mym = 25
        var mx = 0
        var my = 0
        var sv = 50
        var status = 1
        var szx = 0
        var szy = 0
        var c = 255
        var n = 0
        var sm = 30
        var cycle = 2
        var done = 2
        function move() {
            if (status == 1) {
                mxm = mxm / 1.05;
                mym = mym / 1.05;
                mx = mx + mxm;
                my = my - mym;
                mxm = mxm + (550 - mx) / 100   //设置转动幅度X
                mym = mym - (300 - my) / 100
                window.moveTo(mx, my)
                rmxm = Math.round(mxm / 10)
                rmym = Math.round(mym / 10)
                if (rmxm == 0) {
                    if (rmym == 0) {
                        status = 2
                    }
                }
            }
            if (status == 2) {
                sv = sv / 1.051  //1.0
                scrratio = 1 + 1 / 3
                mx = mx - sv * scrratio / 2
                my = my - sv / 2
                szx = szx + sv * scrratio
                szy = szy + sv
                window.moveTo(mx, my)
                window.resizeTo(szx, szy)
                if (sv < 0.1) {
                    status = 3
                }
            }
            if (status == 3) {
                c = c - 16
                if (c < 0)
                { status = 8 }
            }
            if (status == 4) {
                c = c + 16
                if (c > 239)
                { status = 5 }
            }
            if (status == 5) {
                c = c - 16
                if (c < 0) {
                    status = 6
                    cycle = cycle - 1
                    if (cycle > 0) {
                        if (done == 1)
                        { status = 7 }
                        else
                        { status = 4 }
                    }
                }
            }
            if (status == 6) {
                document.title = ""
                alert("")
                cycle = 2
                status = 4
                done = 1
            }
            if (status == 7) {
                c = c + 4
                if (c > 128)
                { status = 8 }
            }
            if (status == 8) {
            }
            var timer = setTimeout("move()", 0.01)
        }
    </script>

=======================================================================

左侧出现旋转打开:

<script type ="text/javascript">
        window.scrollBy(0, 100)
        window.resizeTo(0, 0)
        window.moveTo(0, 0)
        setTimeout("move()", 1);
        var mxm = 50
        var mym = 25
        var mx = 0
        var my = 0
        var sv = 50
        var status = 1
        var szx = 0
        var szy = 0
        var c = 255
        var n = 0
        var sm = 30
        var cycle = 2
        var done = 2
        function move() {
            if (status == 1) {
                mxm = mxm / 1.05
                mym = mym / 1.05
                mx = mx + mxm
                my = my - mym
                mxm = mxm + (5 - mx) / 100   //设置转动幅度X
                mym = mym - (300 - my) / 100
                window.moveTo(mx, my)
                rmxm = Math.round(mxm / 10)
                rmym = Math.round(mym / 10)
                if (rmxm == 0) {
                    if (rmym == 0) {
                        status = 2
                    }
                }
            }
            if (status == 2) {
                sv = sv / 1.0  //1.0
                scrratio = 1 + 1 / 3
                mx = mx - sv * scrratio / 2
                my = my - sv / 2
                szx = szx + sv * scrratio
                szy = szy + sv

            if (mx > -473 && my > -176) {
                  //  alert(mx + "," + my)
                    window.moveTo(mx, my)
                    window.resizeTo(szx, szy)
                    if (sv < 0.1) {
                        status = 3
                    }
                }
                else {
                    return;
                }
             
            }
            if (status == 3) {
                c = c - 16
                if (c < 0)
                { status = 8 }
            }
            if (status == 4) {
                c = c + 16
                if (c > 239)
                { status = 5 }
            }
            if (status == 5) {
                c = c - 16
                if (c < 0) {
                    status = 6
                    cycle = cycle - 1
                    if (cycle > 0) {
                        if (done == 1)
                        { status = 7 }
                        else
                        { status = 4 }
                    }
                }
            }
            if (status == 6) {
                document.title = ""
                alert("")
                cycle = 2
                status = 4
                done = 1
            }
            if (status == 7) {
                c = c + 4
                if (c > 128)
                { status = 8 }
            }
            if (status == 8) {
            }
            var timer = setTimeout("move()", 0.01)
        }   
    </script>

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值