showModalDialog依次弹出两个模态窗口.两个窗口同时关闭并刷新父窗体

来源:互联网 发布:怎样p2p网络投资 编辑:程序博客网 时间:2024/04/29 20:56

 如下:

 

<base target="_self" />

A页面 --->  showModalDialog( B );  window.location.href=window.location.href;

 

 

<base target="_self" />

B页面 --->  showModalDialog( C );  self.close();

 

 

C页面 --->  self.close();

 

原理:

操作顺序:

点击A页面中的按钮打开B页面,再点击B页面中的按钮打开C页面,当C页面关闭的时候同时关闭B页面,并同时刷新A页面... 

代码依次执行的顺序:

showModalDialog( B );   -->    showModalDialog( C );  -->  self.close();  -->   self.close();  --> window.location.href=window.location.href;

 

 

原创粉丝点击