jQuery MiniUI

 找回密码
 立即注册
查看: 3456|回复: 1
打印 上一主题 下一主题

如何动态添加控件 [复制链接]

Rank: 3Rank: 3

跳转到指定楼层
楼主
发表于 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);
        }
为什么添加出的控件无效了

Rank: 8Rank: 8

沙发
发表于 2014-4-4 15:32:39 |只看该作者
最后执行下mini.parse()对html进行解析

Archiver|普加软件

GMT+8, 2025-6-8 06:45 , Processed in 1.043632 second(s), 9 queries .

Powered by Discuz! X2

© 2001-2011 Comsenz Inc.

回顶部