当我点击后代按钮时,我想要表单标记。 当我点击另一个按钮时,只能抓住它的祖先表单标记。
jquery代码是什么?
**我的HTML代码在这里
<form class="edit">
<div>
<div></div>
</div>
<div>
<div>
<!-- When I click this button I want it's ancestor form tag only the edit form not the next or more-->
<span><button>Click</button></span>
</div>
</div>
</form
<form class="edit">
<div>
<div></div>
</div>
<div>
<div>
<!-- When I click this button I want it's ancestor form tag only the edit form not the next, previous, or more..-->
<span><button>Click</button></span>
</div>
</div>
</form