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

📄 back19.htm

📁 javascript各种效果的实例及源代码
💻 HTM
字号:
<html>
<head>
<title>精彩的变色文字</title>
<style type="text/css">
<!--
body {  font-family: "宋体"; font-size: 9pt; margin-top: 0px; margin-left: 0px; margin-right: 0px}
A { COLOR: black; FONT-SIZE: 9pt; FONT-WEIGHT: 400; TEXT-DECORATION: none }
 A:hover { COLOR: red; FONT-SIZE: 9pt; 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>精彩的变色文字</font></center>
<br>
<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 width=350>
   <script language="JavaScript">
 
 
 /* This script was made by Erik.  You can contact him me worfy@geocities.com or at my homepage www.geocities.com/Area51/Corridor/4090. I know that it doesn't look pretty in the source code, but that couldn't be helped.  Feel free to modify this script in any way but please give me credit.  This is my first real script.  
 BTW  for you yankees, I spell colour with the U because I'm Canadain.*/
 
 
 hexa = new MakeArray(16)
 hexa[10] = "A"
 hexa[11] = "B"
 hexa[12] = "C"
 hexa[13] = "D"
 hexa[14] = "E"
 hexa[15] = "F"
 
 function MakeArray(n)
 {
 this.length = n
 for (var i = 0; i <= n; i++)
 this[i] = i
 return this
 }
 
 function colours(text){
 
 var posa = 0
 var posb = 1
 while (posa <= text.length){
 var r = Math.floor(Math.random() * 15)
 var rr= Math.floor(Math.random() * 15)
 var g = Math.floor(Math.random() * 15)
 var gg = Math.floor(Math.random() * 15)
 var b = Math.floor(Math.random() * 15)
 var bb = Math.floor(Math.random() * 15)
 if (text.substring(posa,posb) == "<"){
 var posaa = 0
 posaa = posa
 while (text.substring(posaa,posb) != ">"){
 posaa++
 posb++
 }
 document.write(text.substring(posa, posb))
 posa = posb 
 posb = posa + 1
 }
 document.write("<font color=#"+hexa[r]+hexa[rr]+hexa[g]+hexa[gg]+hexa[b]+hexa[bb]+">")
 document.write(text.substring(posa, posb)+"</font>")
 posa++
 posb++
 }
 }
 
 </script>
 
   <script language = "javascript">
 
 text = "This JavaScript shows every other letter of text as a different, random colour."
 text +="You can also use any <blink> <font size=9> HTML </font> </blink> codes that you want"
 text +=" As long as you don't use quotation marks and the commands have a space between them."
 text +="  You can use any background colour or picture that you want, but black or white is sugeste"
 text +="d <b> <u>HAVE FUN!!! </u> </b>"
 
 colours(text)
 
 </script>
</td></tr></table></center>
<br>
<br>
<center>
<textarea name=source rows=12 cols=45 class=yk9>
脚本说明:
把如下代码加入<body>区域中
   <script language="JavaScript">
 
 
 /* This script was made by Erik.  You can contact him me worfy@geocities.com or at my homepage www.geocities.com/Area51/Corridor/4090. I know that it doesn't look pretty in the source code, but that couldn't be helped.  Feel free to modify this script in any way but please give me credit.  This is my first real script.  
 BTW  for you yankees, I spell colour with the U because I'm Canadain.*/
 
 
 hexa = new MakeArray(16)
 hexa[10] = "A"
 hexa[11] = "B"
 hexa[12] = "C"
 hexa[13] = "D"
 hexa[14] = "E"
 hexa[15] = "F"
 
 function MakeArray(n)
 {
 this.length = n
 for (var i = 0; i <= n; i++)
 this[i] = i
 return this
 }
 
 function colours(text){
 
 var posa = 0
 var posb = 1
 while (posa <= text.length){
 var r = Math.floor(Math.random() * 15)
 var rr= Math.floor(Math.random() * 15)
 var g = Math.floor(Math.random() * 15)
 var gg = Math.floor(Math.random() * 15)
 var b = Math.floor(Math.random() * 15)
 var bb = Math.floor(Math.random() * 15)
 if (text.substring(posa,posb) == "<"){
 var posaa = 0
 posaa = posa
 while (text.substring(posaa,posb) != ">"){
 posaa++
 posb++
 }
 document.write(text.substring(posa, posb))
 posa = posb 
 posb = posa + 1
 }
 document.write("<font color=#"+hexa[r]+hexa[rr]+hexa[g]+hexa[gg]+hexa[b]+hexa[bb]+">")
 document.write(text.substring(posa, posb)+"</font>")
 posa++
 posb++
 }
 }
 
 </script>
 
   <script language = "javascript">
 
 text = "This JavaScript shows every other letter of text as a different, random colour."
 text +="You can also use any <blink> <font size=9> HTML </font> </blink> codes that you want"
 text +=" As long as you don't use quotation marks and the commands have a space between them."
 text +="  You can use any background colour or picture that you want, but black or white is sugeste"
 text +="d <b> <u>HAVE FUN!!! </u> </b>"
 
 colours(text)
 
 </script>
</textarea>
<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>
<br>
</body>
</html>

⌨️ 快捷键说明

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