把鼠标移到图片上可以看到渐变的效果

王朝other·作者佚名  2008-05-31
宽屏版  字体: |||超大  

<!--要完成此效果需要两个步骤

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

<script language="JavaScript">

<!-- Funny text script by Bart Jellema

var hellotext="欢迎光临网页教学网"

var thetext=""

var started=false

var step=0

var times=1

function welcometext()

{

times--

if (times==0)

{

if (started==false)

{

started = true;

window.status = hellotext;

setTimeout("anim()",1);

}

thetext = hellotext;

}

}

function showstatustext(txt)

{

thetext = txt;

setTimeout("welcometext()",4000)

times++

}

function anim()

{

step++

if (step==7) {step=1}

if (step==1) {window.status='>==='+thetext+'===<'}

if (step==2) {window.status='=>=='+thetext+'==<='}

if (step==3) {window.status='>=>='+thetext+'=<=<'}

if (step==4) {window.status='=>=>'+thetext+'<=<='}

if (step==5) {window.status='==>='+thetext+'=<=='}

if (step==6) {window.status='===>'+thetext+'<==='}

setTimeout("anim()",200);

}

</script>

<!--第二步:把“onLoad="welcometext()"”加在<body>标记里-->

<body onLoad="welcometext()">

 
 
 
免责声明:本文为网络用户发布,其观点仅代表作者个人观点,与本站无关,本站仅提供信息存储服务。文中陈述内容未经本站证实,其真实性、完整性、及时性本站不作任何保证或承诺,请读者仅作参考,并请自行核实相关内容。
© 2005- 王朝网络 版权所有