--------a.html-----------
<script>
var newwin=window.open("../help/help.html");
</script>
<input type=button value="close new window" onclick="newwin.close();">
//关闭新开窗口
---------end--------------------再新窗口中关闭用如下--------top.window.close();---------end---------------------
<script>
var newwin=window.open("../help/help.html");
</script>
<input type=button value="close new window" onclick="newwin.close();">
//关闭新开窗口
---------end--------------------再新窗口中关闭用如下--------top.window.close();---------end---------------------
m_objWindow 为一全局变量,然后在需要的地方用:
m_objWindow .close();
m_objWindow 这种命名方式是在JS中定义全局变量的方式还是你的习惯?
请教多谢!
<input type=button onclick="location.replace('newFrame.htm')" value=打开多帧>