首页 > Web开发 > 详细

[Jquery]斑马线表格

时间:2014-11-19 07:03:01      阅读:349      评论:0      收藏:0      [点我收藏+]
<!doctype html>
<html>
<head>
<script src=‘js/jquery-1.9.1.min.js‘></script>
<script type="text/javascript">
	$(document).ready(function() {
	$(‘tr:even‘).css(‘background‘,‘#dedede‘);
	$(‘tr:odd‘).css(‘background‘,‘#ffffff‘);
	});
</script>
<body>
	<table>
		<tr>
			<th>Product</th>
			<th>Description</th>
			<th>Price</th>
		</tr>
		<tr>
			<td>Paper Towels</td>
			<td>The most absorbent paper towels.</td>
			<td>$18.99</td>
		</tr>
		<tr>
			<td>Paper Napkins</td>
			<td>Perfect for your outdoor gathering.</td>
			<td>$16.99</td>
		</tr>
		<tr>
			<td>Paper Plates</td>
			<td>The best value.</td>
			<td>$5.99</td>
		</tr>
		<tr>
			<td>Plastic Forks</td>
			<td>The essential picnic accessory.</td>
			<td>$2.99</td>
		</tr>
	</table>
</body>
</html>

 

[Jquery]斑马线表格

原文:http://www.cnblogs.com/bushe/p/4107095.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!