<head><script type="text/javascript">function dk(){ myWeb=window.open("","","width=500,height=500");//为什么这里不用定义就直接赋值了,如果改为var myWeb=window.open("","","width=500,height=500");则下面就关闭函数就调用不了,当点击closeweb链接的时候,没有反应myWeb.document.write("This is 'poem'");myWeb.document.write("<img src=\"images/Koala.jpg\"/>");}function closeWin() { myWeb.close() }</script></head><body><a href="#" onclick="dk()">openweb</a><a href="#" onclick="closeWin()">closeweb</a></body>
添加回答
举报
0/150
提交
取消