<head><script type="text/javascript">function dk(){?myWeb=window.open("","","width=500,height=500");//為什么這里不用定義就直接賦值了,如果改為var myWeb=window.open("","","width=500,height=500");則下面就關(guān)閉函數(shù)就調(diào)用不了,當(dāng)點(diǎn)擊closeweb鏈接的時(shí)候,沒有反應(yīng)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>
這是一個(gè)打開和關(guān)閉新窗口的例子,里面我有疑惑,請(qǐng)求助。
superli18
2015-12-07 18:25:08