<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>
這是一個打開和關閉新窗口的例子,里面我有疑惑,請求助。
superli18
2015-12-07 18:25:08