html - window.close()
study/language 2009/03/26 22:13기본은
window.close();
self.close();
opener.close();
document.close();
닫을때 확인 메시지 없이 닫을려고 하면
opener=self;self.close();
opener.open('about:blank', '_self').close();
a페이지가 닫혔는지 알아내기..
function openNewWindow() {
newWin = window.open('a페이지', '', '');
window.setInterval("onClosed(alert('a'));", 1000, "JavaScript");
window.setInterval("onClosed(alert('a'));", 1000, "JavaScript");
}
function onClosed(evalStr) {
if (newWindow.closed)
function onClosed(evalStr) {
if (newWindow.closed)
eval(evalStr);
}
예)
var webConsol = null;
function webConsolWindow(url) {
var sStatus = "width=1024,height=768,directories=no,location=no,menubar=no,resizable=no,scrollbars=no,status=yes,titlebar=no,toolbar=no";
webConsol = window.open(url, 'webConsol', sStatus);
window.setInterval("webConsolWindowClosed();", 100, "JavaScript");
}
예)
var webConsol = null;
function webConsolWindow(url) {
var sStatus = "width=1024,height=768,directories=no,location=no,menubar=no,resizable=no,scrollbars=no,status=yes,titlebar=no,toolbar=no";
webConsol = window.open(url, 'webConsol', sStatus);
window.setInterval("webConsolWindowClosed();", 100, "JavaScript");
}
function webConsolWindowClosed() {
if (webConsol.closed) {
window.location.href="/login.jsp";
}
}
if (webConsol.closed) {
window.location.href="/login.jsp";
}
}
'study > language' 카테고리의 다른 글
html - window.close() (0) | 2009/03/26 |
---|---|
html - IE 6/7에서의 Select 옵션 잘림 현상 (0) | 2009/03/24 |
java - HttpURLConnection (1) | 2009/02/18 |
javascript - 0, "" (0) | 2009/02/13 |
javascript - stack overflow at line (0) | 2008/12/22 |
javascript - parseInt, parseFloat (0) | 2008/12/09 |
No comments:
Post a Comment