js监听窗口关闭的事件写法
1 let winObj =window.open(url); 2 let loop = setInterval(function() { 3 if(winObj.closed) { 4 clearInterval(loop); 5 _this.setState({ 6 isLoading:false 7 }) 8 } 9 }, 1000);
监听新的窗口关闭,通过window返回的closed参数进行判断
想要这样一间小木屋,夏天挫冰吃瓜,冬天围炉取暖.