function AddDiv() {
DeleteDiv();
var d = document.createElement("DIV");
d.id = "ProgressDialog";
document.body.insertBefore(d, document.body.firstChild);
d.style.display = 'block';
d.style.height = document.body.scrollHeight;
appcan.window.openToast("请稍后", -1, 5, 1);
}
function DeleteDiv() {
var my = document.getElementById("ProgressDialog");
if (my != null) {
my.parentNode.removeChild(my);
appcan.window.closeToast();
}
}
我是这么写的,用的时候直接AddDiv(),关的时候直接DeleteDiv()