'팝업 중앙'에 해당되는 글 1건

  1. 2008.03.02 팝업창 중앙에 띄우기 2
var x,y;
if (self.innerHeight) { // IE 외 모든 브라우저
  x = (screen.availWidth - self.innerWidth) / 2;
  y = (screen.availHeight - self.innerHeight) / 2;
}else if (document.documentElement && document.documentElement.clientHeight) { // Explorer 6 Strict 모드
  x = (screen.availWidth - document.documentElement.clientWidth) / 2;
  y = (screen.availHeight - document.documentElement.clientHeight) / 2;
}else if (document.body) { // 다른 IE 브라우저( IE < 6)
  x = (screen.availWidth - document.body.clientWidth) / 2;
  y = (screen.availHeight - document.body.clientHeight) / 2;
}
window.moveTo(x,y);
Posted by 철냄비짱
,