<script type="text/javascript">
$("li:eq(2)").css("background-color", "#60F");
</script>
$("li:eq(2)").css("background-color", "#60F");
</script>
2015-05-07
var A=[
{name:" 张三", value:"22.2"},
{name:"李四", value:"99"},
{name:"赵欢", value:"40"},
{name:"王梅", value:"10"},
];
$.each(A,function(index) {
$(".json_demo").append('<a>'+A[index].name+'</a>');
$("span").append('<a>'+A[index].value+'</a>');
{name:" 张三", value:"22.2"},
{name:"李四", value:"99"},
{name:"赵欢", value:"40"},
{name:"王梅", value:"10"},
];
$.each(A,function(index) {
$(".json_demo").append('<a>'+A[index].name+'</a>');
$("span").append('<a>'+A[index].value+'</a>');
$("p~label").css("border", "solid 1px red");
$("p~label").html("我们都是p先生的粉丝");
$("p~label").html("我们都是p先生的粉丝");
2015-05-07
<script type="text/javascript">
$("p+label").css("background-color","red");
</script>
$("p+label").css("background-color","red");
</script>
2015-05-07
$("div>label").css("border", "solid 5px red");
2015-05-07
$(".red,.green").html("hi,我们的样子很美哦!");
2015-05-07
$("li:eq(-3)").css("background-color", "#ccc");
$("li:eq(2)").css("background-color", "#ccc");
效果一样
$("li:eq(2)").css("background-color", "#ccc");
效果一样
2015-05-06