addClass() and removeClass();
attr() special the attribute of field.
attr() special the attribute of field.
2015-09-30
// $("input[type='submit']").addClass("bg_red");
there are more than one method you can use to select the field you needed.
there are more than one method you can use to select the field you needed.
2015-09-30
<body><ul><li>1</li>...<li>8</li><a href="#">更多</a></ul></body><script"> $("li:gt(3):not(:last)").hide(); $("a").click(function(){ var a =$("a").html(); if(a=="更多"){ $("a").html("简化"); $("li").show();return; }else{ $("a").html("更多");$("li:gt(3):not(:last)").hide();return; }})</script>