父框架代码:
<html>
<head>
<title>index.htm</title>
</head>
<body>
<input type=text name="psy">
<iframe src="1.htm"></iframe>
</body>
</html>
子框架代码( 1.htm ):
<html>
<head>
<form action="admin.asp" method="post">
<input name="ad" type="checkbox" value="1" id="xxx" onClick="parent.document.getElementByIdx('psy').value=forms[0].ad.value;">
<input type="submit" value="提交">
<input type="reset" value="全部重写">
</form>
</body>
</html>
下面这点是本人自己加的了,可以把1.htm中的
onClick="parent.document.getElementByIdx('psy').value=forms[0].ad.value;"
换成
onClick="parent.document.getElementByIdx('psy').value=forms[0].ad.id;"
这样就方便一点了,换了有什么好处自己想去!嘿嘿.......v