Всем привет! Хочу сделать так, чтобы в текущем окне открылось popup окно и пока это новое окно не закрылось в первом окне выполнялись какие-то действия. Вот что у меня есть:
| Код | <!DOCTYPE html> <html> <body>
<script type="text/javascript">
popWindow = window.open("http://google.com.ua", "contacts", "location,width=400,height=300,top=0"); console.log(popWindow.closed); intervalId = window.setInterval (clll(popWindow,intervalId),2000); function clll(popWindow,intervalId){ if(!popWindow.closed){ clearInterval(intervalId); } else{ document.write("Привет Мир!"); //document.getElementById('content').innerHTML = '<b>Новое содержимое</b>'; } } </script>
<div id="content"></div>
</body> </html>
|
|