WINDOW.OPEN

Category
아이템: 
포스트 갯수1

window.open 객체에 대한 통신 (window.postMessage) - window.open으로 열린 창이 정상적으로 열렸는지 확인

window.open으로 열은 새창이 정상적으로 Load가 되었는지 체크하고, 완료 되었을 경우 계산이 되게끔 하려고 함. 123456789<script>//origin main site url - http://main.whereisthissite.comvar cnt = 0;var windowObj = window.open("http://sub.whereisthissite.com")windowObj.onload = function(){ cnt++;}</script> Colored by Color Scriptercs 하지만... 이렇게 하려면 프로토콜(http, https 등), 호스트네임(hostname), 포트(port) 세가지 모두 동일해야 가능하다고 한다...