<!doctype html> <html> <head> <meta charset="utf-8"> <title>js文字闪烁</title> <script src="http://libs.baidu.com/jquery/1.11.3/jquery.min.js"></script> <style> </style> </head> <body> <a id="blink" style="color:red">测试文字闪烁</a> <script> function blinklink() { if (document.getElementById('blink').style.color == "red") { document.getElementById('blink').style.color = "#DF7202"; } else { document.getElementById('blink').style.color = "red"; } timer = setTimeout("blinklink()", 600); } function stoptimer() { clearTimeout(timer); } blinklink(); </script> </body> </html>