鼠標MoveOn、MoveOut、Click 動態效果javascript
<html> <head> <meta http-equiv="Content-Type" content="text/html; charset=gb2312"> <title>Test</title> <style> .tj_time a{float:left; display:block; background:#CBF2FE; margin-right:6px; padding:2px 5px; color:#036; text-decoration:none; cursor:auto;} .tj_time a:hover{background:#84D2E9; color:#fff;} .tj_time a:visited{background:#63B0C9; color:#fff; cursor:auto;} .tj_time .hover{background:#84D2E9; color:#fff; cursor:auto;} </style> <script type="text/javascript" src="http://code.jquery.com/jquery-1.9.1.min.js"></script> <script type="text/javascript"> $(function(){ $("div.tj_time a").click( function(){ $(this).addClass("hover").siblings("a").removeClass("hover"); }); }); </script> </head> <body> <div class="tj_time"><a >一</a><a >二</a><a >三</a></div> </body> </html>