框架关闭和重定向新的url打开相同的窗口


frame close and redirect the new url open same window

如何关闭框架并重定向新url以在同一窗口中打开?

这里框架关闭,但不重定向到google.com。

代码:

function close_pay3() {
  window.parent.$(".effect" ).hide('clip', 1000 ); 
  return false;
  window.open('https://www.google.com','_self');
}
<a href="#" style="text-decoration:none;"><input type="button" onClick="close_pay3()" class="close-btn" value="Login" name="boxclose" />  
</a>

您的return出的功能之前,您的窗口打开…将return false;作为最后一行

function close_pay3() {
    window.parent.$(".effect").hide('clip', 1000,function(){
      window.open('https://www.google.com', '_self');
     });
}

.

<a href="#" style="text-decoration:none;"><input type="button" onClick="close_pay3(); return false;" class="close-btn" value="Login" name="boxclose" />  
</a>

您已经将所有函数()放入了弹出框中。

function close_pay3()
{ $(".effect" ).hide('clip', 1000 );
window.parent.document.getElementById('krish').style.display="none";
window.location.href = "https://google.com";
return false;
}<input type="button" onClick="javascript:window.parent.close_pay3()" class="close-btn" value="Login" name="boxclose" />

返回false;应该在

之后
window.open('https://www.google.com', '_self');
return false;