showModalDialog 子页面 操作父页面值
a.htm
<input type="text" id="taskId" name="taskId" value="rrrrr">
<input type=button value="open 3" οnclick="window.showModalDialog('3.htm',window);">
<script>
//alert("我是2")
</script>
3.htm
<input type="button" value="refresh 2 and close me"
οnclick="myclick();
">
<!--
window.dialogArguments.location='2.htm';
window.parent.close()
-->
<script type="text/javascript">
function myclick(){
//var te=window.dialogArguments.document.getElementByid("taskId").value;
var te=window.dialogArguments.document.getElementsBysName("taskId")[0].value;
alert(te);
}
</script>