|

点开父窗口(fu.html) ,点图片链接打开子窗口(zi.html) 子窗口有一条数据库记录(方便显示我直接写出来了),点这条记录会把这条记录的ID传到父窗口里。我以前都是在子窗口用到按钮提交可以实现关闭当前子窗口,用链接后这个方法就不行了。
问题:点链接后在新的当前窗口打开了父窗口,而不是把值传到了老的父窗口。
等待高手给指教,谢谢~~~~!
父窗口 fu.html
<html xmlns="http://www.w3.org/1999/xhtml" >
<head>
<title>父窗口</title>
</head>
<body>
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="1" class="bgc_table">
<tr>
<td width="33%" class="bgc_td">
<input style="WIDTH: 127px" name=PolicyId >
<a href="javascript:void(0)" onclick="javascript:window.open
('zi.html','newwindow','toolbar=no,scrollbars=yes,resizable=no,top=200,left=300,width=400,height=380');"
><img src="../images/customerdetail.gif" /></a>
</td>
</tr>
</table>
</body>
</html>
子窗口 zi.html
<html xmlns="http://www.w3.org/1999/xhtml" >
<head>
<title>子窗口</title>
<link href="../css/css.css" rel="stylesheet" type="text/css">
<script language="JavaScript" type="text/javascript">
function close()
{
window.opener='';
window.close();
}
</script>
</head>
<body>
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0" class="bian">
<tr>
<td width="18%" class="titlebg bianr">人员编号</td>
</tr>
</table>
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="1">
<tr><a href="fu.html?bdid=100100" onclick="close()">
<td width="18%" class="bgc_td_c"><font color=red>编号为100100的记录</font> </td>
</a>
</tr>
</table>
</body>
</html> |
|