大众信息网

angularjs ngdialog.closeall 除了closeall还有其他close方法吗

关注:263  答案:3  手机版
解决时间 2021-01-28 00:43
angularjs ngdialog.closeall 除了closeall还有其他close方法吗
最佳答案
实例
显示和关闭对话窗口:
var x = document.getElementById("myDialog");

function showDialog()
{
x.show();
}

function closeDialog()
{
x.close();
}
注意: 目前只有Chrome Canary,Safari 6 浏览器支持 close() 方法。
注意: 即便 Chrome Canary 支持 <dialog> 元素 , 你必须在Chrome地址栏中打开 chrome://flags 并开启 "Enable experimental Web Platform features" 标记。 在开启后,需要重启Chrome浏览器。
全部回答
showClose {Boolean} If false it allows to hide close button on modals, default true. closeByEscape {Boolean} It allows to close modals by clicking Esc button, default true. This will close all open modals if there several of them open at the same time. closeByDocument {Boolean} It allows to close modals by clicking on overlay background, default true. .close(id) Method accepts dialog's id as string argument to close specific dialog window, if id is not specified it will close all currently active modals (same behavior as .closeAll()). .closeAll() Method manages closing all active modals on the page.
没用过这个,只用过bootstrap的modal,帮你查了下api showClose {Boolean} If false it allows to hide close button on modals, default true. closeByEscape {Boolean} It allows to close modals by clicking Esc button, default true. This will close all open modals if there several of them open at the same time. closeByDocument {Boolean} It allows to close modals by clicking on overlay background, default true. .close(id) Method accepts dialog's id as string argument to close specific dialog window, if id is not specified it will close all currently active modals (same behavior as .closeAll()). .closeAll() Method manages closing all active modals on the page.
我要举报
如以上问答内容为低俗、色情、不良、暴力、侵权、涉及违法等信息,可以点下面链接进行举报!