<script language="JavaScript">
function setE(id,pid,name,pname)
{
opener.form1.type2.value = id;
opener.form1.type2_temp.value = name;
opener.form1.type1.value = pid;
opener.form1.type1_temp.value = pname;
window.close();
}
</script>
关键是opener参数,表示父窗口的document。