1. a.htm 父页<br /> 有 window.showModalDialog(&quot;b.htm&quot;);<br /> 有 Html元素 &lt;input type=&quot;text&quot; id=&quot;t1&quot; name=&quot;t1&quot; value=&quot;value&quot;&gt;<br /> <br /> 2.b.htm 弹出页面<br /> 能否在 b.htm 上取到 a.htm 中 t1的值<br /> <br /> 回答:<br /> 在a.html中设置<br /> var results = window.showModalDialog(&quot;b.html&quot;);<br /> if(results){<br /> alert(results[&quot;key&quot;]);<br /> }<br /> <br /> 在b.html中<br /> &lt;script&gt;<br /> window.returnValue={<br /> key:&quot;返回到父页面&quot;<br /> }<br /> &lt;/script&gt;<br /> <br />
T:0.008893s,M:244 KB
返回顶部 留言