日期:2009-11-23  浏览次数:20836 次

parent.htm :<br>
<br>
&lt;HTML&gt;&lt;BODY&gt;<br>

&lt;P&gt;&nbsp;&lt;/P&gt;<br>
&lt;form name=fm_Info&gt;<br>
&lt;input type=text name=txtValue&gt;<br>
&lt;/form&gt;<br>
&lt;script language=javascript&gt;<br>
var timer<br>
var winOpen<br>
function IfWindowClosed() {<br>
&nbsp;&nbsp;&nbsp;&nbsp;if (winOpen.closed == true) {&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;document.fm_Info.txtValue.value=&quot;child closed&quot;<br>
&nbsp;&nbsp;&nbsp;&nbsp;window.clearInterval(timer)<br>
&nbsp;&nbsp;&nbsp;&nbsp;}<br>
}<br>
&lt;/script&gt;<br>
&lt;input type=button name=btnOpen value=open&gt;<br>
<br>
&lt;script language=javascript for=btnOpen event=onclick&gt;<br>
document.fm_Info.txtValue.value=&quot;&quot;<br>
&nbsp;&nbsp;&nbsp;&nbsp;winOpen=window.open(&quot;child.htm&quot;,&quot;&quot;,&quot;toolbar=no, location=no, directories=no, status=no, menubar=no&quot; )<br>
&nbsp;&nbsp;&nbsp;&nbsp;timer=window.setInterval(&quot;IfWindowClosed()&quot;,500);<br>
&lt;/script&gt;<br>
&lt;/BODY&gt;&lt;/HTML&gt;<br>
------------------<br>
There can be anything in child.htm<br>