function showMsg(message, title) { if( title == null ) title = "";var d = new dijit.Dialog({id : "myDialog",closable : false,title : title,content : "div align='center'"+ message +"brbutton data-dojo-type='dijit/form/Button' type='button' o
function showMsg(message, title) { if( title == null ) title = ""; var d = new dijit.Dialog({ id : "myDialog", closable : false, title : title, content : "<div align='center'>"+ message +"<br><button data-dojo-type='dijit/form/Button' type='button' onclick='dijit.byId(\"myDialog\").destroy()'>确定</button></div>", }).show(); }
使用方法:
showMsg("请选择删除项","提示信息");
点击“确定”按钮后,提示框消失, 关键是要调用destroy()销毁,否则下次调用就会报错