-----------------------------------------------------------------父窗体------------------------------------------------------------------------------------ |
<!DOCTYPE html> |
<html> |
<head> |
<meta http-equiv= "Content-Type" content= "text/html;charset=gbk" /> |
<script language= "JavaScript" type= "text/JavaScript" > |
var neww; |
function aaa(windowname,axcfds,DaXiao ){ |
neww=window.open(windowname,axcfds,DaXiao); |
neww.window.focus(); |
} |
</script> |
<title></title> |
</head> |
<body> |
<form> |
<input type= "text" id= "aa" ><input type= "button" onclick= "javascript:aaa('aa.html','Yaldex','width=400,height=300')" value= "调出子窗体" > |
</form> |
</body> |
</html> |
-------------------------------------------------------------子窗体--------------------------------------------------------------------------------------- |
<!DOCTYPE html> |
<html> |
<head> |
<meta http-equiv= "Content-Type" content= "text/html;charset=utf-8" /> |
<title></title> |
</head> |
<body> |
<script language= "javascript" type= "text/javascript" > |
function Valid() |
{ |
var Strbb=document.getElementById( "bb" ).value; |
opener.document.getElementById( "aa" ).value=Strbb; |
} |
</script> |
<form> |
<input type= "text" id= "bb" > |
<!--若是用ASP此处就用这一句<asp:TextBox ID= "bb" runat= "server" ></asp:TextBox>--> |
<input type= "button" value= "断定" onclick= "javascript:Valid();window.close();" > |
</form> |
</body> |
</html> |