日期:2014-05-16 浏览次数:20351 次
<div id="theExpreeResult"> <div class="inputRemarkItem"> <input class="inputRemark" /><a href="###" class="add_item">添加</a> </div> <div class="inputRemarkItem"> <input class="inputRemark" /><a href="###" class="Del_ite">删除</a> </div> <div class="inputRemarkItem"> <input class="inputRemark" /><a href="###" class="Del_ite">删除</a> </div> </div> <a href="###" class="a_submit">提交</a>
$(".a_submit").click(function() { var result; $("#theExpreeResult > div").each(function() { if (result != null) { result += "|"; } result += $(this).find('input').val(); }); alert(result); });