jQuery MiniUI
标题:
如何动态添加控件
[打印本页]
作者:
luoxibinken
时间:
2014-4-4 15:30:48
标题:
如何动态添加控件
function addrow() {
var allottbl = $("#allottbl");
var rowcount = $("#allottbl tr").length;
var trhtml = "<tr>";
trhtml += "<td>";
trhtml += "<input name='allotTypeID2' textname='allotType2' class='mini-combobox' valuefield='dicvalueValue' textfield='dicvalueName' url='../Handler/Common/SelectDic.ashx?TypeID=9686196a-fcb7-4273-982e-7baaf1c725d9' emptytext='类型' shownullitem='true' nullitemtext='类型' style='width: 100%' />";
trhtml += "</td>";
trhtml += "<td>";
trhtml += "<input name='allotCustID1' textname='allotCustName2' class='mini-autocomplete' required='true' style='width: 100%;' valuefield='custID' textfield='custName' url='../Handler/Common/SelectCustomer.ashx' onvalidation='onComboValidation' emptytext='请选择食货' />";
trhtml += "</td>";
trhtml += "<td>";
trhtml += "<input name='sceneSettlementPeriod2' class='mini-spinner' minvalue='0' maxvalue='999999999' style='width: 100%' />";
trhtml += "</td>";
trhtml += "<td>";
trhtml += "<a href='javascript:removerow()'><img src='../Scripts/miniui/themes/icons/no.png' border='0' /></a>";
trhtml += "</td>";
trhtml += "</tr>";
allottbl.append(trhtml);
}
为什么添加出的控件无效了
作者:
factory
时间:
2014-4-4 15:32:39
最后执行下mini.parse()对html进行解析
欢迎光临 jQuery MiniUI (http://miniui.com/discuss/)
Powered by Discuz! X2