Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
Tags
- 이클립스
- C34G55T
- ant
- mybatis
- 구글
- HTML
- 삼성 오디세이 G5 C34G55T
- tomcat
- jsp
- javascript
- DBCP
- 디자이어
- SWFUpload
- eclipse
- oracle
- 모토로이
- 자바
- Spring
- 오라클
- FTP
- 초대장
- USB
- Java
- SQL
- 삼성 오디세이
- Desire
- jeus
- htc
- HD2
- jvm
Archives
- Today
- Total
앙되요
ie9 창닫힐 때 onunload 이벤트 안먹는 문제. 본문
출처 : http://computerhelpforums.net/topic/35277-internet-explorer-same-markup-writing-cross-browser-code/
// [TR] Different listeners added for illustration
function f1() { document.write("addEventListener was used"); }
function f2() { document.write("attachEvent was used"); }
// Use this: Feature Detection
if(window.addEventListener) {
window.addEventListener("load", f1, false);
} else if(window.attachEvent) {
window.attachEvent("onload", f2);
}
Try It!IE9 Output: addEventListener was used
IN IE 9 browser shut down behavior is disabled, that means that window.onunload event won't fire. In all browsers except IE9 this behavior is enabled by default.http://www.grouppolicy.biz/2011/03/internet-explorer-9-group-policy-settings/
저런식으로 하면 된다지만..
사실. onunload는 여전히 안먹는다.
결국
브라우저의 셋팅을 만저주어야만 사용가능하다.
ie7,ie8은 onunload가 enable, ie9는 disable로 되어 있어서 그렇다