网页里闪动的文字怎么写啊
发布网友
发布时间:2022-05-03 10:13
我来回答
共1个回答
热心网友
时间:2023-10-20 21:28
<html>
<head><title>hello</title></head>
<body>
<font color=red id="change">我们都是好孩子</font>
<script language="javascript">
var i=0,mm
var xxx=["#098712","red","yellow","blue","green","#aaccdd"]//这里面加自己想要的颜色就行了
function xx(){
mm=xxx[i]
i++
if(i==(xxx.length-1)){
i=0
}
document.getElementById("change").style.color=mm
}
setInterval("xx()",100)
</script>
</body>
</html>
热心网友
时间:2023-10-20 21:28
<html>
<head><title>hello</title></head>
<body>
<font color=red id="change">我们都是好孩子</font>
<script language="javascript">
var i=0,mm
var xxx=["#098712","red","yellow","blue","green","#aaccdd"]//这里面加自己想要的颜色就行了
function xx(){
mm=xxx[i]
i++
if(i==(xxx.length-1)){
i=0
}
document.getElementById("change").style.color=mm
}
setInterval("xx()",100)
</script>
</body>
</html>