图片渐渐出现脚本 dn001 2009-06-21 08:34:37 <!--要完成此效果需要两个步骤 第一步:把如下代码加入到<head>区域中--> <SCRIPT LANGUAGE="JavaScript"> <!-- hide script from old browsers var phrase = "欢迎光临网页教学网->>为您提供一切建站咨讯"; var lenPhrase = phrase.length; var phraseOut = ""; var pause = 100; var i=0; var j=0; function explode() { i++; phraseOut = ""; for (j=1; j<=(lenPhrase/2)-i; j++) { phraseOut += " "; } for (j=1; j<=i; j++) { phraseOut += phrase.charAt(j-1); } for (j=i; j>=1; j--) { phraseOut += phrase.charAt(lenPhrase-j); } for (j=1; j<=(lenPhrase/2)-i; j++) { phraseOut += " "; } window.status = phraseOut; if (i<lenPhrase/2) { setTimeout("explode()",pause); } } // end hiding contents --> </SCRIPT> <!--第二步:把“OnLoad="explode()"”加在<body>标记里--> <body OnLoad="explode()">