<script>
$("li:gt(1):not(:first)").hide();
$("a").click(function(){ var a =$("a").html();
if(a=="更多"){ $("a").html("简化");
$("li").show();}
else{ $("a").html("更多");
$("li:gt(1):not(:last)").hide();}}
)</script>
$("li:gt(1):not(:first)").hide();
$("a").click(function(){ var a =$("a").html();
if(a=="更多"){ $("a").html("简化");
$("li").show();}
else{ $("a").html("更多");
$("li:gt(1):not(:last)").hide();}}
)</script>
$.getScript("http://www.imooc.com/data/sport_f.js",function()
2015-10-16
1、:radio选择器获取表单中全部的单选按钮元素
2、选择状态设为不可用:attr("disabled","true")
3、hide()方法的功能是隐藏指定的元素
2、选择状态设为不可用:attr("disabled","true")
3、hide()方法的功能是隐藏指定的元素
2015-10-16
答案太死板
$("li:eq(-3)").css("background-color", "#60F");
$("li:eq(-3)").css("background-color", "#60F");
2015-10-15