<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>
李晓健
哥特式KK
相关分类