jQuery MiniUI
标题:
showMessageBox 怎么通过其他事件触发关闭
[打印本页]
作者:
tigerwithwing
时间:
2021-4-17 13:32:41
标题:
showMessageBox 怎么通过其他事件触发关闭
showMessageBox 怎么通过其他事件触发关闭? 我自定义个 html的弹出框
var htmlContent = document.getElementById("htmlContent");
function htmlClick() {
htmlContent.style.display = "";
mini.showMessageBox({
width: 250,
title: "自定义Html",
buttons: ["ok", "cancel"],
message: "自定义Html",
html: htmlContent,
showModal: false,
callback: function (action) {
alert(action);
}
});
}
我用这个弹出框做一个进度提醒,当进度达到100%的时候,自动关闭.
作者:
tigerwithwing
时间:
2021-4-17 23:12:19
找到了方法了:
var message_id;
var htmlContent = document.getElementById("htmlContent");
function htmlClick() {
htmlContent.style.display = "";
message_id = mini.showMessageBox({
width: 250,
title: "自定义Html",
buttons: ["ok", "cancel"],
message: "自定义Html",
html: htmlContent,
showModal: false,
callback: function (action) {
alert(action);
}
});
}
//关闭方法
mini.hideMessageBox(message_id );
欢迎光临 jQuery MiniUI (http://miniui.com/discuss/)
Powered by Discuz! X2