求一段JAVA特效代码可以在点过链接后,选中的链接背景颜色变蓝 RT一个表格中,有三个文字链接在页面的左右,内容在右边显示,在点过其中一个链接后,选中的这个链接背景颜色变蓝或其它的,三个文件链接分别在三个表格中,如果三个链接都没选中,颜色都要一样!只有选中的变颜色!谢谢大伙了! 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 a:link {color: #FF0000; text-decoration: none} /* 未访问的链接 */a:visited {color: #00FF00; text-decoration: none} /* 已访问的链接 */a:hover {color: #FF00FF; text-decoration: underline} /* 鼠标在链接上 */a:active {color: #0000FF; text-decoration: underline} /* 激活链接 */ <!--不知道你是要该单元格背景变色还是整个表格,点击第一次变色,在点一次变回原来色,如果不要这个效果把toggle改为click--><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml" ><head> <title>无标题页</title> <script type="text/javascript" src="jquery-1.3.2.min.js"></script> <style type="text/css"> table{border:1px solid #ccc;} td{border:1px solid #ccc;} </style> <script type="text/javascript"> $(document).ready(function(){ $("a").toggle(function(){ $(this).parent().css("background","#ccc"); },function(){ $(this).parent().css("background",""); }) }) </script></head><body><table cellpadding="0" cellspacing="0"> <tr> <td><a href="#">第一个链接</a></td> </tr></table><br /><table cellpadding="0" cellspacing="0"> <tr> <td><a href="#">第二个链接</a></td> </tr></table><br /><table cellpadding="0" cellspacing="0"> <tr> <td><a href="#">第三个链接</a></td> </tr></table></body></html> 【初学者求教】如何跨越面传值? 同等情况下,如都是30条记录的xml文件,与30条记录的sql server groupbox showModalDialog打开窗口中treeView的问题 今天遇到奇怪问题pageload执行了2次,郁闷 GridView的编辑功能 求分类信息 真的很急!问题一直未解决 救命啊!ASP.NET只要执行数据库操作就提示存储器不足无法操作 "运行时错误 "是怎么产生的?万分火急! Ajax 如何判断返回对象个数 ASPxTreeList点击+或排序后无显示
a:link {color: #FF0000; text-decoration: none} /* 未访问的链接 */
a:visited {color: #00FF00; text-decoration: none} /* 已访问的链接 */
a:hover {color: #FF00FF; text-decoration: underline} /* 鼠标在链接上 */
a:active {color: #0000FF; text-decoration: underline} /* 激活链接 */
<!--不知道你是要该单元格背景变色还是整个表格,点击第一次变色,在点一次变回原来色,如果不要这个效果把toggle改为click-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head>
<title>无标题页</title>
<script type="text/javascript" src="jquery-1.3.2.min.js"></script>
<style type="text/css">
table{border:1px solid #ccc;}
td{border:1px solid #ccc;}
</style>
<script type="text/javascript">
$(document).ready(function(){
$("a").toggle(function(){
$(this).parent().css("background","#ccc");
},function(){
$(this).parent().css("background","");
})
})
</script>
</head>
<body>
<table cellpadding="0" cellspacing="0">
<tr>
<td><a href="#">第一个链接</a></td>
</tr>
</table><br />
<table cellpadding="0" cellspacing="0">
<tr>
<td><a href="#">第二个链接</a></td>
</tr>
</table><br />
<table cellpadding="0" cellspacing="0">
<tr>
<td><a href="#">第三个链接</a></td>
</tr>
</table>
</body>
</html>