如何获得子窗口的子窗口 子窗口是iframe?既然是iframe,关A了就会全关的. 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 A:<html><head><script language="JavaScript">var newWindow;function createNewWindow(){ newWindow=window.open("B.html","_blank","height=300,width=300");}function closeNewWindow(){ if(newWindow) { newWindow.newWindow.close(); newWindow.close(); newWindow=null; newWindow=null; }}</script></head><body onunload="closeNewWindow()"><form><input type="button" value="点击创建新窗口" onclick="createNewWindow()"/><input type="button" value="关闭新窗口" onClick="closeNewWindow()"></input></form></body></html>B.html<html><head><script language="JavaScript">var newWindow;function createNewWindow(){ newWindow=window.open("C.html","_blank","height=300,width=300");}function closeNewWindow(){ if(newWindow) { newWindow.close(); newWindow=null; }}</script></head><body onunload="closeNewWindow()"><h1>子页</h1><form><input type="button" value="点击创建新窗口" onclick="createNewWindow()"/><input type="button" value="关闭新窗口" onClick="closeNewWindow()"></input></form></body></html>C.html子子页 谢谢.如LS所写,解决了html. cloneNode()和appendChild()的问题。坐等。。。。 #include "值",值表示的是一个变量,要怎么写呢? 如何禁用IE浏览器的关闭功能 再次提问,要求给出一个按钮,弹出一个界面只用于选择时间(注,不包含日期的选择,只要时间)(工作中实际问题) 求助:判断字符长度的正则表达式 href的问题 各位男生你们好,一个简单的问题。 这一段代码百思不得其解?大侠帮忙看看 为何我在window.open中使用center=yes属性不起作用? jquery 如何让一张图片 从右下角慢慢变大展开 JS的DOM问题求教 拖动问题,好奇怪啊!!!
<head>
<script language="JavaScript">
var newWindow;
function createNewWindow()
{
newWindow=window.open("B.html","_blank","height=300,width=300");
}
function closeNewWindow()
{
if(newWindow)
{
newWindow.newWindow.close();
newWindow.close();
newWindow=null;
newWindow=null;
}
}
</script>
</head>
<body onunload="closeNewWindow()">
<form>
<input type="button" value="点击创建新窗口" onclick="createNewWindow()"/>
<input type="button" value="关闭新窗口" onClick="closeNewWindow()"></input>
</form>
</body>
</html>
B.html<html>
<head>
<script language="JavaScript">
var newWindow;
function createNewWindow()
{
newWindow=window.open("C.html","_blank","height=300,width=300");
}
function closeNewWindow()
{
if(newWindow)
{
newWindow.close();
newWindow=null;
}
}
</script>
</head>
<body onunload="closeNewWindow()">
<h1>子页</h1>
<form>
<input type="button" value="点击创建新窗口" onclick="createNewWindow()"/>
<input type="button" value="关闭新窗口" onClick="closeNewWindow()"></input>
</form>
</body>
</html>
C.html子子页
如LS所写,解决了html.