我有一個簡短的問題。循環多個div和這些div中的input/textarea的最有效方法。jQuery Loop問題
例如,我有以下HTML
<div class="formatInput">
<h4>Section Header</h4>
<input type="text" class="formatSectionHeader" width="100%"/>
<h4>Section Content</h4>
<textarea class="formatSectionContent"></textarea>
<p style="float:right;"><span class="removeFormatInput">Remove Section</span></p>
</div>
我做了一個按鈕,將允許用戶如果需要添加更多.formatInput的div。
在它結束時我有一個刷新按鈕,我想通過每個div循環並按順序收集輸入和textarea控件的值。