How to get child window url from parent window using javascript
问题 I'm launching a child window with a window reference name. I want to capture the URL of the child window when it changes each time. var winRef; var url='http://www.google.com'; if(winRef == null || winRef.closed) { winRef = window.open(url, "mywindow"); winRef.focus(); alert(winRef.location.href); } winRef.captureEvents(Event.CHANGE); winRef.onchange=function(){ alert('change event triggered'); console.log(winRef.location.href); } I have tried with events LOAD, CHANGE to capture the location