如何在Jquery UI对话框中添加多个按钮? [英] How to add multiple buttons in Jquery UI dialog box?
本文介绍了如何在Jquery UI对话框中添加多个按钮?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
按钮:{
关闭:function(){
$(this).dialog(close);
}
解决方案
创建他们使用此格式,'按钮文本':function(){}
在其间插入逗号,如下所示:
'确认':function(){
// do something
$(this).dialog('close');
},
'取消':function(){
$(this).dialog('close');
}
}
});
I would like to have more than one button. I tried to copy code between brackets but doesnt work.Ideas?
buttons: {
"Close": function() {
$(this).dialog("close");
}
解决方案
Create them using this format, 'button text': function() { }
with a comma inbetween, like this:
$("#mydialog").dialog({
buttons: {
'Confirm': function() {
//do something
$(this).dialog('close');
},
'Cancel': function() {
$(this).dialog('close');
}
}
});
这篇关于如何在Jquery UI对话框中添加多个按钮?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文