1,main.jsp
<body>
<form name="form1">
<input type="text" name="main" id="mainTxt">
</form>
<iframe src="1.jsp" name="subFrame"></iframe>
</body>
2, 1.jsp
<form action="1.jsp" method="post" target="subFrame">
<input name="ck" type="checkbox" value="1" id="bb" onClick="parent.document.getElementById('mainTxt').value=forms[0].ck.value;">
<input type="submit" value="submit">
</form>
<body>
<form name="form1">
<input type="text" name="main" id="mainTxt">
</form>
<iframe src="1.jsp" name="subFrame"></iframe>
</body>
2, 1.jsp
<form action="1.jsp" method="post" target="subFrame">
<input name="ck" type="checkbox" value="1" id="bb" onClick="parent.document.getElementById('mainTxt').value=forms[0].ck.value;">
<input type="submit" value="submit">
</form>