2个回答
2013-09-06
展开全部
我觉得完全可以实现,下面代码已经过调试。<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>在父窗口中关闭子窗口</title>
<script>
function opennew(){
new_win=window.open("","","");//弹出的子窗口
}
function closenew(){
new_win.close();
}
</script>
</head>
<body>
<input name="opennew" type="button" onclick="opennew()" value="打开子窗口" />
<input name="closenew" type="button" onclick="closenew()" value="关闭子窗口" />
</body>
</html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>在父窗口中关闭子窗口</title>
<script>
function opennew(){
new_win=window.open("","","");//弹出的子窗口
}
function closenew(){
new_win.close();
}
</script>
</head>
<body>
<input name="opennew" type="button" onclick="opennew()" value="打开子窗口" />
<input name="closenew" type="button" onclick="closenew()" value="关闭子窗口" />
</body>
</html>
2013-09-06
展开全部
<script type="text/javascript">
window.onunload=function()
{
window.open(' http://www.qq.com');
}
</script>
window.onunload=function()
{
window.open(' http://www.qq.com');
}
</script>
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询