使用 Jquery,我想知道当我单击按钮 (btnId) 时如何在标签之间
获取文本(Take this text click in button (btnId)<h4> </h4>
)?因为我太难解决了!
<div class = "class1" id = "class1">
<div class = "class2" id = "class2">
<div class = "class4" id = "class4">
<h4 class = "h_reference" id = "h_reference"> Take this text clicking in button (btnId)</h4>
</div>
</div>
<div class = "class3" id = "class3">
<div class = "class5" id = "class5">
<div class = "class6" id = "class6">
</div>
<div class = "class7" id = "class7">
<div class = "class8" id = "class8">
<div class = "class9" id = "class9">
</div>
<button id="btnId" />
</div>
</div>
</div>
</div>
</div>