티스토리 뷰
popup <-> opener간 통신을 위한 코드
- opener 에 message listen 이벤트 구현
window.onmessage = function(e){
if(e.origin.indexOf('tistory.com') < 0){
return;
}
if(e.data.type == 'test'){
alert(e.data);
}
};
if(e.origin.indexOf('tistory.com') < 0){
return;
}
if(e.data.type == 'test'){
alert(e.data);
}
};
- popup
window.open("http://tistory.com", "popup",
"scrollbars=no,toolbar=no," +
"location=no,resizable=no," +
"status=no,menubar=no,width=444,height=365");
- popup window에서 실행
opener.postMessage(eval('({"type":"test"})'),'http://tistory.com');
"scrollbars=no,toolbar=no," +
"location=no,resizable=no," +
"status=no,menubar=no,width=444,height=365");
- popup window에서 실행
opener.postMessage(eval('({"type":"test"})'),'http://tistory.com');
'공부 > uncategorized' 카테고리의 다른 글
문서 자동화 (0) | 2016.05.18 |
---|---|
DSL : Domain-Specific Language (0) | 2016.04.27 |
Yobi (0) | 2015.05.24 |
HTTP Referer (0) | 2015.05.08 |
HTML 특수문자 리스트 (0) | 2015.03.03 |
댓글
공지사항
최근에 올라온 글
최근에 달린 댓글
- Total
- Today
- Yesterday
링크
TAG
- 프로젝트
- 충북대
- SVN
- SQL
- 정보
- db
- jsp
- 데이터베이스
- 졸업작품
- 잡담
- 소켓
- 이론
- 파이썬
- 자바스크립트
- 클래스
- 아두이노
- 안드로이드
- 게임
- ERP
- 도전과제
- 정렬
- 자바
- 배열
- CSS
- HTML
- 오라클
- 알고리즘
- JQuery
- 청주
- 메모장
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | |||
5 | 6 | 7 | 8 | 9 | 10 | 11 |
12 | 13 | 14 | 15 | 16 | 17 | 18 |
19 | 20 | 21 | 22 | 23 | 24 | 25 |
26 | 27 | 28 | 29 | 30 | 31 |
글 보관함