<!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>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>无标题文档</title>
<script src="js/jquery.min.js"></script>
<script>
$(function(){
//选中第一个tr元素,设置背景颜色为黑色,字体颜色为白色(过滤器先用类选择器选中后在设定条件。一般是数组形式的,针对特定的一组元素进行设置)
$("tr:eq(0)").css({
backgroundColor:"black",
color:"white"
});
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>无标题文档</title>
<script src="js/jquery.min.js"></script>
<script>
$(function(){
//选中第一个tr元素,设置背景颜色为黑色,字体颜色为白色(过滤器先用类选择器选中后在设定条件。一般是数组形式的,针对特定的一组元素进行设置)
$("tr:eq(0)").css({
backgroundColor:"black",
color:"white"
});