checke-box取值,radio取值
<div class="col-md-10" id="gzlx">
<label class="checkbox-inline"><input type="checkbox" name="gzlx" value="0600501">公章</label> <label class="checkbox-inline"><input type="checkbox" name="gzlx" value="0600502">法人章</label> <label class="checkbox-inline"><input type="checkbox" name="gzlx" value="0600503">造价师章</label> <label class="checkbox-inline"><input type="checkbox" name="gzlx" value="0600504">成果章</label> </div>
var gzlxArr = []; var gzlxmArr = []; $("input[name='gzlx']:checked").each(function(i){ gzlxArr.push($(this).val()) gzlxmArr.push($(this).parent().text()) }) var formVal=$("#sealModal_form").getJsonData(); formVal['gzlx'] = gzlxArr.join(",") formVal['gzlxm'] = gzlxmArr.join(",")
formVal['fzrmc'] = $("#fzrid option:selected").text()//获取select标签的选项文本