你知道为什么 event.url 总是未定义吗?这是为loadstart
和loadstop
。
谷歌页面在弹出窗口中显示良好。
var ref = window.open('http://google.com', '_blank', 'location=yes');
ref.addEventListener('loadstart', function() { alert('start: ' + event.url); });
ref.addEventListener('loadstop', function() { alert('stop: ' + event.url); });
ref.addEventListener('exit', function() { alert(event.type); });