自己用来练习的,附上详细注释,如果有和我一样喜欢并想要学习Dom特效创作的朋友,推荐先系统了解Javascript中Html Dom Object部分的内容,包括常用方法及属性。
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>文字段逐个变色循环特效</title>
</head>
<body>
<a href="#" style="text-decoration:none">
<script type="text/javascript">
//判断是否为IE浏览器,这一步可以不要
function isIe(){
return ("ActiveXObject" in window);
}
//全局变量
var words="请点我这里!";
var n=0;
var flashing;
var temp=[];
document.write('<B><font size="12px" color="red">'); //输出html元素标签等内容
//依次改变words的格式
for(