<script language="javascript">
function a()
{
iii=window.open ("t.htm","b");//弹出b窗口
}
function winClose()//关闭b窗口---怎么写?????
{
iii.close()
}
</script>
function a()
{
iii=window.open ("t.htm","b");//弹出b窗口
}
function winClose()//关闭b窗口---怎么写?????
{
iii.close()
}
</script>
yao fan hui da kai chuang kou de ju bing,cai neng dui ta jin xing kong zhi.
function a()
{
var child=window.open ("t.htm","b");//弹出b窗口
}
function winClose()//关闭b窗口---怎么写?????
{
if (!child)
alert("先建立窗口");
else if(child.closed)
alert("窗口已经关闭");
else
child.close();
}
</script>
这是比较好的作法,因为你的子窗口可能已经关闭或没有打开