⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 you13.htm

📁 javascript各种效果的实例及源代码
💻 HTM
字号:
<html>

<head>

<title>字符在FORM中坠落</title>

<style type="text/css">

<!--

body {  font-family: "宋体"; font-size: 9pt; margin-top: 0px; margin-left: 4px; margin-right: 0px}

A { COLOR: black; FONT-SIZE: 13px; FONT-WEIGHT: 400; TEXT-DECORATION: none }

 A:hover { COLOR: red; FONT-SIZE: 13px; FONT-WEIGHT: 400; TEXT-DECORATION: underline }

a:active     { font: 9pt "宋体"; cursor: hand; color: #FF0033 }

--></style>

<meta http-equiv="Content-Type" content="text/html; charset=gb2312">

</head>

<body bgcolor="#fef4d9">

<br>

<br>

<center><font color=red face="隶书" size=6>字符在FORM中坠落</font></center>

<br>

<center>

<table border=5 bordercolor=blue borderlight=green>

<tr><td align=center><font size=5 color=red face="Arial, Helvetica, sans-serif"><strong>下面框中为脚本显示区</strong></font></td></tr>

<tr><td align=center height=80><script language="javascript">



function drip(){

        wordy="南京有线宽带网";

        document.hey.a.value="";

        document.hey.b.value="";

        document.hey.c.value="";

        document.hey.d.value="";

        word="";

        beat=0;

        aa=0;

        bb=0;

        cc=0;

        dd=0;

        lo=wordy.length;

        drop(); 

}

function drop(){

        if(beat<=lo*3+1){

        beat=beat+1;

        if(beat<=1){

                document.hey.a.value=wordy;

        }

        if(beat>1&&beat<=lo+1){

                fin="";

                aa=aa+1;

                for(var x=0;x<=aa-1;x++){

                        fin=fin+" ";

                }

                fin=fin+wordy.substring(aa,lo);

                document.hey.a.value=fin;

                document.hey.b.value=wordy.substring(0,aa);

        }

        if(beat>lo+1&&beat<=lo*2+1){

                fin="";

                bb=bb+1;

                for(var x=0;x<=bb-1;x++){

                        fin=fin+" ";

                }

                fin=fin+wordy.substring(bb,lo);

                document.hey.b.value=fin;

                document.hey.c.value=wordy.substring(0,bb);

        }

        if(beat>lo*2+1&&beat<=lo*3+1){

                fin="";

                cc=cc+1;

                for(var x=0;x<=cc-1;x++){

                        fin=fin+" ";

                }

                fin=fin+wordy.substring(cc,lo);

                document.hey.c.value=fin;

                document.hey.d.value=wordy.substring(0,cc);

        }

        setTimeout("drop()",200);

        }

        else{

                document.hey.d.value=wordy;

        }

}



</script>

<form name="hey">

<input type="text" name="a" size=12><br>

<input type="text" name="b" size=12><br>

<input type="text" name="c" size=12><br>

<input type="text" name="d" size=12><br><BR>

<input type="button" name="start" value="Start" onclick="drip()">

</td></tr></table></center>

<br>

<br>

<center>



<SCRIPT LANGUAGE="JavaScript">



<!-- hide

function goHist(a)

{

   history.go(a);

}

//-->

</script>

<FORM METHOD="post">

<INPUT TYPE="button" VALUE="返回" onClick="goHist(-1)" style="background-color: #8000FF; color: rgb(255,255,255)">

</form>

</center>

<br>

<center>

<textarea name=source rows=12 cols=55 class=yk9>

脚本说明:

把如下代码加入<body>区域中:

<script language="javascript">



function drip(){

        wordy="南京有线宽带网";

        document.hey.a.value="";

        document.hey.b.value="";

        document.hey.c.value="";

        document.hey.d.value="";

        word="";

        beat=0;

        aa=0;

        bb=0;

        cc=0;

        dd=0;

        lo=wordy.length;

        drop(); 

}

function drop(){

        if(beat<=lo*3+1){

        beat=beat+1;

        if(beat<=1){

                document.hey.a.value=wordy;

        }

        if(beat>1&&beat<=lo+1){

                fin="";

                aa=aa+1;

                for(var x=0;x<=aa-1;x++){

                        fin=fin+" ";

                }

                fin=fin+wordy.substring(aa,lo);

                document.hey.a.value=fin;

                document.hey.b.value=wordy.substring(0,aa);

        }

        if(beat>lo+1&&beat<=lo*2+1){

                fin="";

                bb=bb+1;

                for(var x=0;x<=bb-1;x++){

                        fin=fin+" ";

                }

                fin=fin+wordy.substring(bb,lo);

                document.hey.b.value=fin;

                document.hey.c.value=wordy.substring(0,bb);

        }

        if(beat>lo*2+1&&beat<=lo*3+1){

                fin="";

                cc=cc+1;

                for(var x=0;x<=cc-1;x++){

                        fin=fin+" ";

                }

                fin=fin+wordy.substring(cc,lo);

                document.hey.c.value=fin;

                document.hey.d.value=wordy.substring(0,cc);

        }

        setTimeout("drop()",200);

        }

        else{

                document.hey.d.value=wordy;

        }

}



</script>

<form name="hey">

<input type="text" name="a" size=12><br>

<input type="text" name="b" size=12><br>

<input type="text" name="c" size=12><br>

<input type="text" name="d" size=12><br><BR>

<input type="button" name="start" value="Start" onclick="drip()">

</textarea>

<br>

<br>

</body>

</html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -