Javascript 文字逐个闪烁

来源:百度知道 编辑:UC知道 时间:2024/04/28 20:43:06
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>逐个闪烁的文字</title>
</head>
<body>
<table width="586" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="193" height="165" valign="top" background="images/images_01.gif"><table width="193" height="143" border="0" cellpadding="0" cellspacing="0">
<tr>
<td height="66"> </td>
</tr>
<tr>
<td height="31" align="center">
<span id=show style="font:21px 汉仪菱心体简"><span style="color:#DDDDDD" scroll="yellow">网上电子商城</span></span>
</td

1、show.all.tags("span");
这个是获得当前页面中所有span层,这样就可以对其属性进行操作。

2、if(!tags[i].scroll)continue;
根据上面得到的span对象,获得它的scroll属性,如果他的scroll属性不是yellow那么继续循环,直到是yellow后对其采用动画效果,即每600毫秒调用一个innerText的颜色层渲染。

希望对你有所帮助。