返回HTML如果我在#parent
點擊我要回裏面的文字和不回報嵌套
層內的文本(#child-parent
,#child
)jQuery的:從DIV,而不是孩子
<div id='parent'>
this text is for parent
<div id='child-parent'>
this text if for child-parent
<div id='child'>
and this text is for child.
</div>
</div>
</div>
這樣的:
$('#parent').html() = "this text is for parent"
,而不是這樣的:
$('#parent').html() = "this text is for parent this text is for child-parent and this text is for child"
哇,非常感謝你! – Zebra 2010-10-08 13:46:33
非常感謝,我發現了三種新的jQuery方法的存在:) – 2010-10-08 13:56:38