zoukankan      html  css  js  c++  java
  • 字符围绕鼠标

    脚本说明:
    <SCRIPT language=javascript>
    <!--//This is a JS program for Sword Jin's JoyFM homepage.All rights reserved.
    var cx=0;
    var cy=0;
    var val=0;
    function locate()
    {    cx=window.event.x;
        cy=window.event.y;
        
    }
    document.onmousemove=locate;
    function follow(i)
    {    var x;
        if(i<4)x=cx-50+i*10;
        else x=cx-25+i*10;
        var y=cy-20+Math.floor(Math.random()*40);
        w=eval("word"+i);
        with(w.style)
        {
        left=x.toString()+"px";
        top=y.toString()+"px";
        }
    }
    function show(i)
    {    
        var w=eval("word"+i);
        with(w.style)
        {
        visibility="visible";
        s=parseInt(fontSize);
        if(s>=200)s-=100;
        else if(s>90&&s<=100)
            {
            s-=85;
            clearInterval(val);
            if(i<5)val=setInterval("show("+(i+1)+")",20);
            }    
        fontSize=s;
        }
        
    }
    function start()
    {    for(i=1;i<=5;i++)
        {
        val=setInterval("show(1)",20);
        setInterval("follow("+i+")",100);
        
        }
    }    
    
    //-->
    </SCRIPT>
    <SCRIPT language=javascript>
        var word=new Array(5);
        word[1]="J";word[2]="o";word[3]="y";word[4]="F";word[5]="m";
        for(i=1;i<=5;i++)
            document.write("<div id='word"+i+"' style='20px;height:20px;position:absolute;font-size:1000;visibility:hidden'><font face='Forte' color='#00FF00'>"+word[i]+"</font></div>");start();
    
        </SCRIPT>
    成功根本没有什么秘诀可言,如果真是有的话,就是两个:第一个就是坚持到底,永不放弃;第二个是当你想放弃的时候,回过头来看看第一个秘诀:坚持到底,永不放弃
  • 相关阅读:
    《自己动手写操作系统》:开发环境配置心得
    sip.conf配置详情
    MySQL字符串中数字排序的问题
    Asterisk iax错误提示
    Python 快速入门
    C# winfrom 导出word
    SetWindowsHookEx函数参数详解
    Ubuntu Linux系统下轻松架设nginx+php服务器应用
    TShockwaveFlash的使用
    检讨
  • 原文地址:https://www.cnblogs.com/yby-blogs/p/4024328.html
Copyright © 2011-2022 走看看