日期:2014-05-17 浏览次数:20710 次
<HTML>
<HEAD>
<SCRIPT>
function setData(d1,d2)
{
document.getElementById("TOWRITESOMETHING1").value=d1;
document.getElementById("TOWRITESOMETHING2").value=d2;
}
function openQueryWnd()
{
window.open("query_customer.jsp.htm","","width=800,height=600");
}
</SCRIPT>
</HEAD>
<BODY>
<INPUT TYPE=TEXT ID=TOWRITESOMETHING1><BR>
<INPUT TYPE=TEXT ID=TOWRITESOMETHING2><BR>
<INPUT TYPE=BUTTON VALUE=QUERY onclick=javascript:openQueryWnd()>
</BODY>
</HTML>
<HTML>
<HEAD>
<SCRIPT>
function sendback2Opener()
{
var d1 = document.getElementById("TOINPUTSOMETHING1").value;
var d2 = document.getElementById("TOINPUTSOMETHING2").value;
opener.setData(d1,d2);
}
</SCRIPT>
</HEAD>
<BODY>
<INPUT TYPE=TEXT ID=TOINPUTSOMETHING1 value='1111'><BR>
<INPUT TYPE=TEXT ID=TOINPUTSOMETHING2 value='2222'><BR>
<INPUT TYPE=BUTTON VALUE=WriteBack2Opener onclick=javascript:sendback2Opener()>
<INPUT TYPE=BUTTON VALUE=Close onclick=javascript:window.close()>