父页面 :

html连接:<a href="javascript:void(0)" onclick="window.open(子页面URL)">
js调用的方法:

function closeWindow(object, isReload) 
{
object.close();
isReload===true && window.location.reload();
}


子页面:

$('#id').on('click',function(){ // 触发事件

if( typeof window.opener == 'object' && typeof window.opener.closeWindow=='function') {
window.opener.closeWindow(window, true); //不刷新 false
}

});



 






相关文章:

  • 2021-08-08
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-10-04
  • 2021-09-03
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-05-23
  • 2022-12-23
相关资源
相似解决方案