showModelessDialog问题

来源:百度知道 编辑:UC知道 时间:2024/06/07 07:39:18
怎么在所弹出的窗口中进行表单操作,使这个弹出窗口把数据提交到另一个页面?

showdialog.htm:

<form id ="form1" name ="form1" method ="post">

传递过去的值:<input type="text" name="tt"><input type ="button" value ="传递" onclick ="doOpen()">
返回来的值得:<input type="text" name="goBackValue" >

</form>
<script>
function doOpen()
{
var ttValue = form1.tt.value;
var getBackValue = showModalDialog("child.htm",ttValue,"");
if (typeof(getBackValue)=="undefined") getBackValue = "";//当返回值出现以外的时候设置返回值为空(如用户没有点返回而是直接关闭了窗口)
form1.goBackValue.value = getBackValue;//把返回的值给文本框goBackValue
}
</script>

child.htm:

获得传递的值,修改该值后将改值返回:<input type="text" id="file_name">
<input type ="button" id ="btnOk" value ="返回值" onclick ="goBack();"><