<!DOCTYPE html><html><head><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()" /></body></html>希望本文所述对大家的javascript程序设计有所帮助。