The example in this article describes the js method to determine whether the subform is closed. Share it with everyone for your reference. The details are as follows:
function InsideMessageAdd() { //window.open()得到子窗体 tip = OpenDialog('UploadFile.html?tp=nbtz', 'msg', 650, 180); //启动timer,判断子窗体是否关闭 timer = window.setInterval("IfWindowClosed()", 500); } var timer; var tip; function IfWindowClosed() { //判断子窗体是否关闭 if (tip.closed == true) { alert("close"); window.clearInterval(timer); } }
I hope this article will be helpful to everyone’s JavaScript programming design.