求网页特效代码

html-css09

求网页特效代码,第1张

打字效果的文字特效[修改显示的文字即可]

[根据下面的说明进行共1步]

====2、以下代码放在HTML的<body></body>之间[适当的位置]:

<script language=javascript>

var layers =document.layers,style=document.all,both=layers||style,idme=908601

if(layers){layerRef='document.layers'styleRef =''}if(style){layerRef='document.all'styleRef =

'.style'}

function writeOnText(obj,str){

if(layers)with(document[obj]){ document.open()document.write(str)document.close()}

if(style)eval(obj+'.innerHTML=str')}

var dispStr=new Array("javascript源码大全")

var overMe=0

function txtTyper(str,idx,idObj,spObj,clr1,clr2,delay,plysnd){

var tmp0=tmp1= '',skip=100

if (both &&idx<=str.length) {

if (str.charAt(idx)=='<'){ while(str.charAt(idx)!='>') idx++idx++}

if (str.charAt(idx)=='&'&&str.charAt(idx+1)!=' '){ while (str.charAt(idx)!= '')idx++idx++}

tmp0 = str.slice(0,idx)

tmp1 = str.charAt(idx++)

if (overMe==0 &&plysnd==1){

if (navigator.plugins[0]){

if(navigator.plugins["LiveAudio"][0].type=="audio/basic" &&navigator.javaEnabled()){document.embeds

[0].stop()

setTimeout("document.embeds[0].play(false)",100)}

} else if (document.all){

ding.Stop()

setTimeout("ding.Run()",100)}

overMe=1}else overMe=0

writeOnText(idObj, "<span class="+spObj+"><font color='"+clr1+"'>"+tmp0+"</font><font color='"+clr2

+"'>"+tmp1+"</font></span>")

setTimeout("txtTyper('"+str+"', "+idx+", '"+idObj+"', '"+spObj+"', '"+clr1+"', '"+clr2+"', "+delay+" ,"+plysnd+")",delay)}}

function init(){txtTyper(dispStr[0], 0, 'ttl0', 'ttl1', '#339933', '#99FF33', 300, 0)}

</script>

<BODY onload=init()>

<DIV class=ttl1 id=ttl0></DIV>

</BODY>

<!--STATUS OK-->

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

<html>

<head>

<meta http-equiv="Content-Type" content="text/htmlcharset=gb2312">

<link rel="alternate" type="application/rss+xml" title="“谁能告诉我一些有用的网页特效代码啊?”的最新回答(RSS 2.0)" href="http://zhidao.baidu.com/q?ct=20&qid=2601349&pn=65535&rn=25&tn=rssqb">

<title>谁能告诉我一些有用的网页特效代码啊?_百度知道 </title>

<style type="text/css">

<!--

a.f12og:link{color:#ff6600}

a.f12og:visited{color:#ff6600}

-->

</style>

<link href="/iknow.css" rel="stylesheet" type="text/css">

<script language="JavaScript" type="text/JavaScript">

function ask(fn)

{document.fask.word.value=fn.word.value

fask.submit()

}

</script>

</head>

<body class="bgbdy" topmargin="0">

<center>

<table width="770" border=0 align="center">

<tbody>

<tr>

<td width="150" valign=top><a href="/"><img src="http://img.baidu.com/img/logo-zhidao.gif" border="0"></a></td>

<td height="55" style="table-layout: fixedword-break: break-all"><table cellspacing=0 cellpadding=0 border=0>

<tr>

<td nowrap class="tab"><a href="http://news.baidu.com" class="headTit">新闻</a>   <a href="http://www.baidu.com/" class="headTit">网页</a>   <a class="headTit" href="http://post.baidu.com/">贴吧</a>   <font class="headTitB">知道</font>   <a class="headTit" href="http://mp3.baidu.com/">MP3</a>   <a class="headTit" href="http://image.baidu.com/">图片</a></td>

</tr>

</table>

<table border="0" cellspacing="0" cellpadding="0">

<tr>

<form action="/q" name="ftop" method="get">

<td nowrap>

<input class=formfont maxlength=256 tabindex=1 size=42 name=word>

</td>

<td width="30" valign="bottom" nowrap><div align="right"><span style="padding-bottom:15px"><a href="http://www.baidu.com/search/zhidao_help.html">帮助</a></span></div></td>

</tr>

</table>

<table cellspacing=0 cellpadding=0 border=0>

<tr valign="bottom">

<td height="28" nowrap > <input type="submit" tabindex=2 value="搜索答案" class="bnsrh">

</td>

<td width="86" nowrap ><div align="right">

<input type="hidden" name="ct" value="17">

<input type="hidden" name="pn" value="0">

<input type="hidden" name="tn" value="ikaslist">

<input type="hidden" name="rn" value="10">

<input type="button" onclick="ask(ftop)" tabindex=3 value="我要提问" class="bnsrh">

</div></td></form>

</tr>

</table>

<form name="fask" action="/q" method="get"><input type="hidden" name="ct" value="17"><input type="hidden" name="pn" value="0"><input type="hidden" name="tn" value="ikask"><input type="hidden" name="rn" value="10"><input type="hidden" name="word" value=""><input type="hidden" name="cm" value="1"><input type="hidden" name="lm" value="394496"></form>

</td></tr>

</table>

<script>

var url = escape(location.href)

function ctlSubmit(event) {

if (event.ctrlKey &&event.keyCode == 13) { fdf.submit() }

}

function checkco(f,des)

{ if(f.co.value=="") {alert("请输入您的"+des)return false}}

function limitpl(f,des)

{ if(f.co.value=="") {alert("请输入您的"+des)return false} return limitChars(f.co,des,200)}

function checkcoAndsn(f,des)

{ if(f.co.value=="") {alert("请输入您的"+des)return false} return limitChars(f.sn,"参考资料",60)