首 页免费资源建站技术源码下载软件下载精品淘吧客户留言
用户登陆 | 用户注册
您当前的位置:笃志小屋建站技术特效代码页面背景 → 文章内容
精彩的变色文字
作者:佚名  来源:不详  发布时间:2007-9-29 22:46:14

精彩的变色文字


<!-- 网页特效代码由duzhi . net提供! -->
<!-- 要实现此效果需要 1 个步骤: -->

<!-- 第 1 步: -->
<!-- 把下面的代码加到<BODY></BODY>区域中: -->

<script language="Javascript">

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>

2007-9-29 22:46:14免费资源duzhi.net

[ ] [返回上一页] [打 印]

【笃志小屋duzhi.net】

  技术文章导航
  技术文章排行
  精彩推荐
Copyright www.duzhi.net All Right Reserved.
设计制作:翼迅设计室 Equick Desgin Home 在线QQ:303471038
网络备案号:冀ICP备06008201号 站长信箱:webmaster#duzhi.net(将#换为@)
本站部分文章和图片来源于网络和内容提供伙伴,如果侵犯了您的权利,请留言告知,本站定会及时删除相关文件!