打开iDialog在 onOpen中赋值Dialog中input不生效问题

提问 未结 3 7633
悬赏:20飞吻
在function中打开一个新的Dialog,在onOpen中对Dialog中的标签赋值,断点显示能正常进入,但无法赋值成功
JS:
$('#AddDialog').iDialog('openDialog',{
title: dgTitle,
width: 400,
height: 250,
iconCls: 'fa fa-key',
href: dgHref,
onOpen:function () {
$('#mkid').iTextbox('setValue',‘123’);
$('#mkmc').val(‘456’);
},
buttons: [{
text: '确定',
iconCls: 'fa fa-save',
btnCls: 'topjui-btn-green'
}, {
text: '关闭',
iconCls: 'fa fa-close',
btnCls: 'topjui-btn-red',
handler: function () {
$("#AddDialog").iDialog('close').form('reset');
}
}]
});
Dialog html:
<div data-toggle="topjui-layout" data-options="fit:true">
<div data-options="region:'center',title:'',fit:true,border:false,bodyCls:'border_right_bottom'">
<div class="topjui-fluid">
<fieldset>
<legend>模块信息</legend><input type="hidden" name="mkid" id="mkid" value="1000">
</fieldset>
<div class="topjui-row">
<div class="topjui-col-sm12">
<label class="topjui-form-label">模块名称</label>
<div class="topjui-input-block">
<input type="text" name="mkmc" id="mkmc" data-toggle="topjui-textbox"
data-options="required:true" value="">
</div>
</div>
</div>
<div class="topjui-row">
<div class="topjui-col-sm12">
<label class="topjui-form-label">模块顺序</label>
<div class="topjui-input-block" style="padding-top: 4px;">
<input type="text" name="px" id="px" data-toggle="topjui-numberspinner" data-options="required:true" value="1">
</div>
</div>
</div>
</div
</div>
</div>
回帖
回帖须知