0
当父母被更改时,是否有办法不影响父母内部的孩子?jquery:如何影响父母而不是孩子?
<p>old text <a class="mylink">old link text</a></p>
$("a.mylink").click(function() {
$(this).parent().text("new text for p");
$(this).text("new link text for a");
});
});
上面似乎完全摆脱了链接文本。我基本上希望能够在点击发生时更改两个文本。
谢谢。
确实,谢谢。 – Tom 2010-03-13 18:50:24