子窗口操作父窗口的form域 window.opener.form1.xbm.value 是不是这个呀 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 to: lbd8848(lbd) 按你说的改了还是不对 代码没有错,你检查下你的父窗口的表单名是否为form1.以及有没有xbm和xb这两个文框。 你的form定义名称了吗?<form name="form1">......</form> 可以呀a.asp------<body><form name=form1><input type=text name=a1 value="ddddd"><input type=text name=a2 value="ccccc"><input type=button value="ddddxxxx" onclick="window.open('b.asp','','')"></form></body>b.asp---------<script language="JavaScript">{alert(window.opener.form1.a1.value);}</script> 父窗口select.htm<html><head><meta http-equiv="Content-Type" content="text/html; charset=gb2312"><title>²Ëµ¥</title><script language="JavaScript"><!--function fPopUpCalendarDlg(ctrlobj,dbname){ showx = event.screenX - event.offsetX - 4 - 210 ; showy = event.screenY - event.offsetY + 18; newWINwidth = 210 + 4 + 18; retval = window.showModalDialog("select1.htm", "", "dialogWidth:197px; dialogHeight:210px; dialogLeft:"+showx+"px; dialogTop:"+showy+"px; status:no; directories:no;scrollbars:no;Resizable=no; " ); if( retval != null ){ document.all[ctrlobj].value = retval; }else{ }}//---></script><LINK href="../css/style.css" rel=stylesheet type=text/css></head><body leftmargin="0" topmargin="0"><form name="form1" method="post" action=""> <table width="600" border="0" cellpadding="0" cellspacing="1" bgcolor="#CCCCCC"> <tr bgcolor="#FFFFFF"> <td width="100" align="center">ÐÔ±ð</td> <td><input name="xb" type="text" size="10" value="" readonly> <input name="xbm" type="hidden" value=""> <img style="CURSOR: hand" onClick="fPopUpCalendarDlg('xbm','gb_t2261');return false;" src="../images/add.gif" width="15" height="12"></td> </tr> <tr bgcolor="#FFFFFF"> <td> </td> <td> </td> </tr> </table></form></body></html>子窗口select1.htm<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"><HTML><HEAD><TITLE>Ñ¡Ôñ±ê×¼´úÂë</TITLE><META http-equiv=Content-Type content="text/html; charset=gb2312"><SCRIPT language=JavaScript><!--function InsertDate(name,code) { opener.form1.xb.value = name; opener.form1.xbm.value = code; window.close();}//---></SCRIPT><LINK href="Ñ¡Ôñ±ê×¼´úÂë.files/style.css" type=text/css rel=stylesheet><META content="MSHTML 6.00.2800.1106" name=GENERATOR></HEAD><BODY leftMargin=0 topMargin=0><TABLE cellSpacing=1 cellPadding=0 width="100%" border=0> <TBODY> <TR onmouseover="this.bgColor='#eeeeee';" onmouseout="this.bgColor='#FFFFFF';" align=middle> <TD onclick=InsertDate('男',0);>男</TD></TR> <TR onmouseover="this.bgColor='#eeeeee';" onmouseout="this.bgColor='#FFFFFF';" align=middle> <TD onclick=InsertDate('女',1);>女</TD></TR> <TR onmouseover="this.bgColor='#eeeeee';" onmouseout="this.bgColor='#FFFFFF';" align=middle> <TD onclick=InsertDate('未知的性别',2);>未知的性别</TD></TR> <TR onmouseover="this.bgColor='#eeeeee';" onmouseout="this.bgColor='#FFFFFF';" align=middle> <TD onclick=InsertDate('未说明的性别',9);>未说明的性别</TD></TR></TBODY></TABLE></BODY></HTML>再帮我看看还是找不出错在那儿了 http://community.csdn.net/Expert/topic/3161/3161503.xml?temp=.4632532 如何把&#开头的编码转为中文? 怎样在数组中插入一个值 mysql 链接问题 mysql_fetch_row 关于php网站访问权限的问题 抓取图片 php css 编码问题 php连接access问题! PHP Smarty 模板的Cache_dir无法改变,求教! php网站替换数据库问题 为什么linux下无法写入 请教怎样安装php+mysql在win2000下,具体怎配置呢? 有一个横向循环不会写了
按你说的改了
还是不对
</form>
a.asp
------
<body>
<form name=form1>
<input type=text name=a1 value="ddddd">
<input type=text name=a2 value="ccccc">
<input type=button value="ddddxxxx" onclick="window.open('b.asp','','')">
</form>
</body>
b.asp
---------
<script language="JavaScript">
{
alert(window.opener.form1.a1.value);
}
</script>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>²Ëµ¥</title>
<script language="JavaScript">
<!--
function fPopUpCalendarDlg(ctrlobj,dbname)
{
showx = event.screenX - event.offsetX - 4 - 210 ;
showy = event.screenY - event.offsetY + 18;
newWINwidth = 210 + 4 + 18; retval = window.showModalDialog("select1.htm", "", "dialogWidth:197px; dialogHeight:210px; dialogLeft:"+showx+"px; dialogTop:"+showy+"px; status:no; directories:no;scrollbars:no;Resizable=no; " );
if( retval != null ){
document.all[ctrlobj].value = retval;
}else{
}
}
//---></script>
<LINK href="../css/style.css" rel=stylesheet type=text/css>
</head>
<body leftmargin="0" topmargin="0">
<form name="form1" method="post" action="">
<table width="600" border="0" cellpadding="0" cellspacing="1" bgcolor="#CCCCCC">
<tr bgcolor="#FFFFFF">
<td width="100" align="center">ÐÔ±ð</td>
<td><input name="xb" type="text" size="10" value="" readonly>
<input name="xbm" type="hidden" value="">
<img style="CURSOR: hand" onClick="fPopUpCalendarDlg('xbm','gb_t2261');return false;" src="../images/add.gif" width="15" height="12"></td>
</tr>
<tr bgcolor="#FFFFFF">
<td> </td>
<td> </td>
</tr>
</table>
</form>
</body>
</html>子窗口select1.htm
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD><TITLE>Ñ¡Ôñ±ê×¼´úÂë</TITLE>
<META http-equiv=Content-Type content="text/html; charset=gb2312">
<SCRIPT language=JavaScript>
<!--
function InsertDate(name,code)
{
opener.form1.xb.value = name;
opener.form1.xbm.value = code;
window.close();
}
//---></SCRIPT>
<LINK href="Ñ¡Ôñ±ê×¼´úÂë.files/style.css" type=text/css
rel=stylesheet>
<META content="MSHTML 6.00.2800.1106" name=GENERATOR></HEAD>
<BODY leftMargin=0 topMargin=0>
<TABLE cellSpacing=1 cellPadding=0 width="100%" border=0>
<TBODY>
<TR onmouseover="this.bgColor='#eeeeee';" onmouseout="this.bgColor='#FFFFFF';"
align=middle>
<TD onclick=InsertDate('男',0);>男</TD></TR>
<TR onmouseover="this.bgColor='#eeeeee';" onmouseout="this.bgColor='#FFFFFF';"
align=middle>
<TD onclick=InsertDate('女',1);>女</TD></TR>
<TR onmouseover="this.bgColor='#eeeeee';" onmouseout="this.bgColor='#FFFFFF';"
align=middle>
<TD onclick=InsertDate('未知的性别',2);>未知的性别</TD></TR>
<TR onmouseover="this.bgColor='#eeeeee';" onmouseout="this.bgColor='#FFFFFF';"
align=middle>
<TD onclick=InsertDate('未说明的性别',9);>未说明的性别</TD></TR></TBODY></TABLE>
</BODY></HTML>再帮我看看
还是找不出错在那儿了