下面是一些补充资料:filter()和not(): 输出 hello alert($("p").filter(".selected").html()); //输出 How are you? alert($("p").not(".selected").html()); }); script>
Hello
How are you?