147、精彩变色文字

147、精彩变色文字

脚本说明:

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

<STYLE type=text/css>.nav {

       COLOR: #0000ff; FONT-FAMILY: Times; FONT-SIZE: 16pt; LEFT: 20px; POSITION: absolute; TEXT-DECORATION: none

}

</STYLE>

<SCRIPT>

<!-- Beginning of JavaScript -

 

var i_strength=0

var max_strength=6

var shadowcolor="red"

var timer

var speed=40

var thisobj

 

function gotoURL(){

      var newWindow=window.open("http://www.7stk.com","newwin","status,directories,menubar,scrollbars,titlebar,toolbar,resizable,HEIGHT=400,WIDTH=400")

      newWindow.focus()

}

function gotoURL1(){

      var newWindow=window.open("http://www.7stk.com/fine/zhufu/zhu07.htm","newwin","status,directories,menubar,scrollbars,titlebar,toolbar,resizable,HEIGHT=400,WIDTH=400")

      newWindow.focus()

}

function gotoURL2(){

      var newWindow=window.open("http://www.7stk.com/fine/ch/c01.htm","newwin","status,directories,menubar,scrollbars,titlebar,toolbar,resizable,HEIGHT=400,WIDTH=400")

      newWindow.focus()

}

function gotoURL3(){

      var newWindow=window.open("http://www.7stk.com/fine/ny/n1.htm","newwin","status,directories,menubar,scrollbars,titlebar,toolbar,resizable,HEIGHT=400,WIDTH=400")

      newWindow.focus()

}

function gotoURL4(){

      var newWindow=window.open("http://www.yahoo.com","newwin","status,directories,menubar,scrollbars,titlebar,toolbar,resizable,HEIGHT=400,WIDTH=400")

      newWindow.focus()

}

 

function stopfilter(thisdiv){

    if (document.all) {

        clearTimeout(timer)

           thisobj=thisdiv

        thisobj.style.filter=" "

    }

}

 

 

function startfilter(thisdiv){

    if (document.all) {

        clearTimeout(timer)

           thisobj=thisdiv

        morefilter()

    }

}

 

function morefilter(){

    if (i_strength <=max_strength) {

           thisobj.style.filter="glow(color="+shadowcolor+", strength="+i_strength+")"

        i_strength++

        timer = setTimeout("morefilter()",speed)

    }

    else {

        clearTimeout(timer)

        lessfilter()

    }

}

 

function lessfilter(){

    if (i_strength >=0) {

           thisobj.style.filter="glow(color="+shadowcolor+", strength="+i_strength+")"

        i_strength--

        timer = setTimeout("lessfilter()",speed)

    }   

    else {

        clearTimeout(timer)

        morefilter()

    }

}

 

// - End of JavaScript - -->

</SCRIPT>

 

<DIV class=nav id=news onclick=gotoURL() onmouseout=stopfilter(this)

onmouseover=startfilter(this) style="TOP: 20px">JavaScript2000 </DIV>

<DIV class=nav id=contact onclick=gotoURL1() onmouseout=stopfilter(this)

onmouseover=startfilter(this) style="TOP: 60px">新浪</DIV>

<DIV class=nav id=chart onclick=gotoURL2() onmouseout=stopfilter(this)

onmouseover=startfilter(this) style="TOP: 100px">网易</DIV>

<DIV class=nav id=besteller onclick=gotoURL3() onmouseout=stopfilter(this)

onmouseover=startfilter(this) style="TOP: 140px">搜狐</DIV>

<DIV class=nav id=scriptkiller onclick=gotoURL4() onmouseout=stopfilter(this)

onmouseover=startfilter(this) style="TOP: 180px">雅虎</DIV>

 

Write a comment

Comments: 0