<html>
<body>
<font id="f">变色comtw</font><script>window.self.setInterval("r()",500);function r(){document.getElementById("f").style.color ="red"==f.style.color?"blue":"red";}</script>
<br/>
<font id="f">变色comtu</font><script>window.self.setInterval("r()",500);function r(){var f = document.getElementById("f");f.style.color ="red"==f.style.color?"green":"green"==f.style.color?"blue":"red";}</script>
</body>
</html>
html变色龙代码_diy
最新推荐文章于 2021-12-12 16:22:23 发布
本文介绍了一个简单的网页元素颜色自动切换的实现方式。通过使用HTML和JavaScript,页面上的文本颜色会在预设的时间间隔内,在几种颜色间进行循环变化。
1191

被折叠的 条评论
为什么被折叠?



