Jquery ui 在对话框上动态设置标题
如何将“myval”作为对话框的标题?在执行Jquery ui 在对话框上动态设置标题,jquery-ui,Jquery Ui,如何将“myval”作为对话框的标题?在执行dlg.dialog('open',myval)时,我尝试将其作为参数传递,但没有成功。我还尝试将其作为参数传递,但也没有成功。但是,我可能做得不对。在单击事件中创建对话框,并使用此对话框设置标题: 大概是这样的: var dlg = $("#dialog").dialog({ autoOpen: false, modal: true, buttons: { 'Update': functio
dlg.dialog('open',myval)
时,我尝试将其作为参数传递,但没有成功。我还尝试将其作为参数传递,但也没有成功。但是,我可能做得不对。在单击事件中创建对话框,并使用此对话框设置标题:
大概是这样的:
var dlg = $("#dialog").dialog({
autoOpen: false,
modal: true,
buttons: {
'Update': function() {
alert(clientCode);
},
Cancel: function() {
$(this).dialog('close');
}
}
});
$(".edit").click(function() {
myval = $(this).parent().children('td:nth-child(1)').text();
dlg.dialog('open');
return false;
});
$(“#您的对话框id”).dialog({
打开:函数(){
$(此).dialog(“选项”、“标题”、“我的新标题”);
}
});
$(".edit").click(function() {
myval = $(this).parent().children('td:nth-child(1)').text();
var dlg = $("#dialog").dialog({
autoOpen: false,
title: myval,
modal: true,
buttons: {
'Update': function() {
alert(clientCode);
},
Cancel: function() {
$(this).dialog('close');
}
}
});
dlg.dialog('open');
return false;
});