$("p").text() //获取text值 $("p").html() //获取整个html值 $(":checkbox").val()
$(".test").attr("alex") //获取alex的属性值 $(".test").attr("alex","sb") //设置alex这个属性的值胃sb
$(".test").attr("checked","checked") $(":checkbox").removeAttr("checked") //移除attr
$(".test").prop("checked",true) //作用同于attr
$(".test").addClass("hide") //设置class值