1.js
다음과 같이 코드 코드를 복사합니다.
<스크립트 유형="텍스트/자바스크립트">
함수 openwindow(url,이름,iWidth,iHeight)
{
// URL은 웹페이지 주소로 리디렉션됩니다.
// 이름 웹페이지 이름, 비워둘 수 있음
// iWidth 팝업 창의 너비
// iHeight 팝업 창의 높이
//window.screen.height는 화면 높이를 가져오고, window.screen.width는 화면 너비를 가져옵니다.
var iTop = (window.screen.height-30-iHeight)/2; //창의 수직 위치를 가져옵니다.
var iLeft = (window.screen.width-10-iWidth)/2; //창의 수평 위치를 가져옵니다.
window.open(url,name,'height='+iHeight+',,innerHeight='+iHeight+',width='+iWidth+',innerWidth='+iWidth+',top='+iTop+',left='+iLeft+ ',toolbar=no,menubar=no,scrollbars=auto,resizeable=no,location=no,status=no');
}
</script>
2. 통화방법
다음과 같이 코드 코드를 복사합니다.
<a href="javascript:void(0);" onclick="javascript:openwindow('a.html','',400,200);">다음으로 이동</a>