当父母被改变时,有没有办法不影响父母内部的孩子?
<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");
});
});
以上似乎完全摆脱了链接文本。我基本上希望能够在点击发生时更改这两个文本。
谢谢你。