标签:
简介:通过JQuery实现鼠标放上及移开时导航栏背景颜色及字体颜色的变化
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="Generator" content="EditPlus®">
<meta name="Author" content="">
<meta name="Keywords" content="">
<meta name="Description" content="">
<title>JQuery-导航</title>
<link type="text/css" rel="stylesheet" href="JQuery.css"/>
<script type="text/javascript" src="http://apps.bdimg.com/libs/jquery/2.1.1/jquery.min.js"></script>
<script>
$(document).ready(function(){
$("#tb_J4 td").mouseover(function(){
$(this).css({‘background‘:‘#F1F1F1‘,‘color‘:‘blue‘});
$(this).mouseout(function(){
$(this).css({‘background‘:‘blue‘,‘color‘:‘#FFFFFF‘});
});
});
});
</script>
</head>
<body>
<div id="div0_J4">
<table id="tb_J4" cellspacing="1px">
<tr>
<td>TAB1</td><td>TAB2</td><td>TAB3</td><td>TAB4</td><td>TAB5</td>
</tr>
</table>
</div>
</body>
</html>
运行结果:
标签:
原文地址:http://www.cnblogs.com/liuadou/p/5435136.html