<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>文字闪烁</title> </head> <body> <span id="blink"><b>奇葩天地网</b></span> <script type = "text/javascript" > function blinklink() { if (!document.getElementById('blink').style.color) { document.getElementById('blink').style.color = "red"; } if (document.getElementById('blink').style.color == "red") { document.getElementById('blink').style.color = "#FFFFFF"; } else { document.getElementById('blink').style.color = "red"; } timer = setTimeout("blinklink()", 500); } function stoptimer() { clearTimeout(timer); } blinklink() </script> </body> </html>
https://blog.csdn.net/guo_qiangqiang/article/details/114688061
标签:style,blinklink,color,blink,getElementById,字体,document,闪烁,css From: https://www.cnblogs.com/huatian007/p/16772361.html