$(function(){
$(".test").each(function(){
test();
});
});
function test(){
$(this).css("border","1px solid red").append(" checked");
}
为什么这不起作用?我错过了什么?这是我的测试html:
<p>test</p>
<p>test</p>
<p class="test">test</p>
<p>test</p>