JavaScript弹出窗口并且向父窗口输出内容代码

JavaScript弹出窗口并且向父窗口输出内容代码

<script>
function  openWin()
{
myWindow=window.open( '' , '' , 'width=200,height=100' );
myWindow.document.write( "<p>This is 'myWindow'</p>" );
myWindow.focus();
myWindow.opener.document.write( "<p>This is the source window!</p>" );
}
</script>
</head>
<body>
<input type= "button"  value= "Open 'myWindow'"  onclick= "openWin()"  /> 
来自CODEGO.NET代码节选


你可能感兴趣的:(function,window,source)