用showModalDialog窗口试试:
test.html<HTML><BODY>
<input type="text" id="txt" size=20>
<script>
function show(){
x = showModalDialog("testnew.html","dialogWidth=200,dialogHeight=100");
txt.value = x;
}
</script>
<input type=button value=open onclick="show()">
</BODY></HTML>testnew.html
<HTML><BODY>
<input type="text" name="dlgtxt">
<button onclick="doSomething()">do somthing</button>
<script>
function doSomething(){
returnValue = dlgtxt.value;
close();
}
</script>
</BODY></HTML>
test.html<HTML><BODY>
<input type="text" id="txt" size=20>
<script>
function show(){
x = showModalDialog("testnew.html","dialogWidth=200,dialogHeight=100");
txt.value = x;
}
</script>
<input type=button value=open onclick="show()">
</BODY></HTML>testnew.html
<HTML><BODY>
<input type="text" name="dlgtxt">
<button onclick="doSomething()">do somthing</button>
<script>
function doSomething(){
returnValue = dlgtxt.value;
close();
}
</script>
</BODY></HTML>
x = showModalDialog("testnew.html","dialogWidth=200,dialogHeight=100");弹出的页面,是在同一域下,的testnew.html,那就也应该能传值回来
不过,多谢楼上,继续等,急死人了!!!!
工具-》选项-->安全-->自定义安全设置-->通过域访问数据资源,改成允许。