当我点击一个按钮时,我使用以下代码作为对话框的功能:
function Confirmation(msg1){
if ($('#exportSales').length == 0) {
$(document.body).append('<div id="exportSales">'+msg1+'</div>');
} else {
$('#exportSales').html(msg1);
}
$("#exportSales").dialog({
autoOpen: false,
show: "blind",
hide: "explode",
height: 450,
width: 1000,
modal: true
});
$( "#exportSales" ).dialog("open");
}
Run Code Online (Sandbox Code Playgroud)
但是,当我在FireBug中检查它时,它在控制台中显示此错误:
TypeError: $(...).dialog is not a function [Break On This Error]
modal: true
Run Code Online (Sandbox Code Playgroud)
编辑:文档中还有另一个对话框运行正常.当我注释掉那个时,然后这个对话框开始工作.如何更改我的代码以便它们可以在同一页面中一起工作?
| 归档时间: |
|
| 查看次数: |
25350 次 |
| 最近记录: |