window.opener | not working in chrome

后端 未结 4 624
一个人的身影
一个人的身影 2020-12-06 21:09

I am having two html pages..i am calling parent window from child..All things works great.but in Chrome it fails..let me know the reason..

test1.html :-



        
4条回答
  •  爱一瞬间的悲伤
    2020-12-06 21:59

    You can try my code:

    window.opener.document.location.href = url;
    

    This will work both IE and Chrome.

    window.opener.location.href = 'test.html';
    

    This would open the page "test.html".

    and you can close the parent window once its opened.

    Don't forget to mark my answer as correct if its works.

提交回复
热议问题