在子窗口点击button, 如何让父窗口跳转 子窗口关闭 有个pageA, 点击pageA内的按钮 弹出页面pageB, pageB里面有一个链接<a href="xxx.html">我想点击<a href="xxx.html">, pageA页面跳转到xxx.html,pageB关闭请高手解答 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 a href="javascript:window.parent.location.href='XXX.HTML';window.close();"好像是,0 0 试试<a href="javascript:window.opener.location.href='XXX.HTML';window.close();" <script> //第一个窗口 var child = window.open("info.html","_blank","width=200,height=200,toolbar=no");</script><body"></body><script>//第二个窗口 info.html function change(){ window.close(); window.opener.location.href = "http://www.baidu.com";//让父亲窗口跳转到baidu }</script><body> <a href="#" onclick="change()">第一页跳转到baidu</a></body> //父窗口弹出子窗口代码var result = window.showModalDialog("dialog.htm", "", "dialogHeight:250px;dialogWidth:550px;status:no; help:no;scroll:no"); if (result != "") { window.location.href = result; }//子窗口超链接<a href="javascript:window.returnValue='XXX.aspx';window.close();">跳转</a> 使用window.opener和window.returnValue都是可以的.使用window.opener:子窗口中<a href="javascript:window.opener.location.href='XXX.aspx';window.close();">跳转</a>使用window.returnValue:父窗口中var url=window.showModalDialog("2.html","","dialogWidth:750px;dialogHeight:750px;center:1"); if (url!=undefined) { window.location.href=url; }子窗口中:<a href="javascript:window.returnValue='XXX.aspx';window.close();">跳转</a> 大牛,看一下我下面这个js方法那里出错了 单击网页元素,得到它的ID并显示出来,怎样实现? 如何用jquery来处理文本字符 vista js问题 判断文本框内容改变 请教:提交等待的问题!!急~~~~ 一个跳转链接的问题 如何用js设置控件的readonly和enabled属性??????????????? 能不能控制窗口打开的时候能够按内容的大小来决定打开窗口的大小? 寻找jquery 滑动插件 怪!怪!js清楚cookie在一级目录下有效,放入其他目录就失效了 【求助】不知有没有朋友能将这个页面中的背景转换效果取出来?
好像是,0 0
<a href="javascript:window.opener.location.href='XXX.HTML';window.close();"
<script>
//第一个窗口
var child = window.open("info.html","_blank","width=200,height=200,toolbar=no");</script>
<body">
</body>
<script>
//第二个窗口 info.html
function change(){
window.close();
window.opener.location.href = "http://www.baidu.com";//让父亲窗口跳转到baidu
}
</script><body>
<a href="#" onclick="change()">第一页跳转到baidu</a>
</body>
//父窗口弹出子窗口代码
var result = window.showModalDialog("dialog.htm", "", "dialogHeight:250px;dialogWidth:550px;status:no; help:no;scroll:no");
if (result != "") {
window.location.href = result;
}//子窗口超链接
<a href="javascript:window.returnValue='XXX.aspx';window.close();">跳转</a>
使用window.opener:
子窗口中<a href="javascript:window.opener.location.href='XXX.aspx';window.close();">跳转</a>使用window.returnValue:
父窗口中var url=window.showModalDialog("2.html","","dialogWidth:750px;dialogHeight:750px;center:1");
if (url!=undefined)
{
window.location.href=url;
}子窗口中:<a href="javascript:window.returnValue='XXX.aspx';window.close();">跳转</a>