Jquery版文字閃爍
阿新 • • 發佈:2017-06-14
jquery log com light blue body javascrip http pre
<html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <script type="text/javascript" src="http://www.w3school.com.cn/jquery/jquery.js"></script> <style type="text/css"> .changecolor1{color:red;} .changecolor2{color:blue;} </style> </head> <body> <script type="text/javascript"> function ChangeColor(){ $("#color1").toggleClass("changecolor1"); $("#color2").toggleClass("changecolor2"); setTimeout("ChangeColor()",1000) } ChangeColor(); </script> <a href="#" style="color:green;"><p id="color1">color1</p></a> <p id="color2">color2</p> </body> </html>
Jquery版文字閃爍