'새창 중앙에 열기'에 해당되는 글 4건

  1. 2008.02.01 새창 가운데 띄우기
  2. 2008.02.01 새창 가운데 열기 - 중앙에 열기
  3. 2008.01.30 새창 띄울때 정 중앙에 열기
  4. 2008.01.29 항상 화면의 중간에 새창 띠우기
<Script Language=javascript>
pw = (screen.availWidth - window.document.body.clientWidth) /2;
ph = (screen.availHeight - window.document.body.clientHeight) /2;
window.moveTo(pw,ph);
</Script>

위 소스를 문서 </body> 바로 위에 넣으세요.
Posted by 알 수 없는 사용자
,
새창으로 열 문서에 삽입하시면 됨니다.

아래 스크립트를 head 태그 안에 삽입하세요.

<script LANGUAGE=JavaScript>
function ctcwin(){
        window.moveTo((window.screen.width-document.body.clientWidth)/2,(window.screen.height-document.body.clientHeight)/2-45);
}
</script>

바디 태그에 onLoad='ctcwin();' 삽입하시구요.
ex - <body onLoad='ctcwin();' leftmargin='0' marginwidth='0' marginheight='0''>

또는 문서 끝 </body> 바로 윗줄에 onload대신 아래 스크립트를 삽입.
<script>
ctcwin()
</script>
Posted by 알 수 없는 사용자
,
<HTML>
<HEAD>
<TITLE></TITLE>

<script language="javascript">
<!--
var win = null;
function NewWindow(mypage,myname,w,h,scroll){
LeftPosition = (screen.width) ? (screen.width-w)/2 : 0;
TopPosition = (screen.height) ? (screen.height-h)/2 : 0;
settings =
'height='+h+',width='+w+',top='+TopPosition+',left='+LeftPosition+',scrollbars='+scroll+',resizable'
win = window.open(mypage,myname,settings)
}
//-->
</script>

</HEAD>
<BODY>

<CENTER>
<a href="http://oxtag.com/zboard/warning_member.php" onclick="NewWindow(this.href,'name','600','400','yes');return false">새창 중앙에 열기</a>
</CENTER>

</BODY>
</HTML>
Posted by 알 수 없는 사용자
,
항상 화면 중앙에 새창 띠우기

미리보기 : http://oxtag.com/html/ex/new_win_center.html

아래 소스를 헤드안에 넣으세요.

<SCRIPT LANGUAGE="JavaScript">
<!--
function launchCenter(url, name, height, width) {
  var str = "height=" + height + ",innerHeight=" + height;
  str += ",width=" + width + ",innerWidth=" + width;
  if (window.screen) {
    var ah = screen.availHeight - 30;
    var aw = screen.availWidth - 10;
    var xc = (aw - width) / 2;
    var yc = (ah - height) / 2;

    str += ",left=" + xc + ",screenX=" + xc;
    str += ",top=" + yc + ",screenY=" + yc;
  }
  return window.open(url, name, str);
}
var win = launchCenter('../filter.html', 'center', 220, 440);
// -->
</SCRIPT>
Posted by 알 수 없는 사용자
,