Appendix/컴퓨터 이야기

메뉴 없이 새 창에서 열기

구름팡팡 2008. 7. 9. 02:26
이 스크립트는 메뉴와 스크롤바 없이 화면만 새로운 창으로 띄워주는 스크립트 입니다.
아래를 눌러 보세요^^

새창으로 열기

<html>
<head>
<script language="JavaScript">
<!--
function na_open_window(name, url, left, top, width, height, toolbar, menubar, statusbar, scrollbar, resizable)
{
  toolbar_str = toolbar ? 'yes' : 'no';
  menubar_str = menubar ? 'yes' : 'no';
  statusbar_str = statusbar ? 'yes' : 'no';
  scrollbar_str = scrollbar ? 'yes' : 'no';
  resizable_str = resizable ? 'yes' : 'no';
  window.open(url, name, 'left='+left+',top='+top+',width='+width+',height='+height+',toolbar='+toolbar_str+',
menubar='+menubar_str+',status='+statusbar_str+',scrollbars='+scrollbar_str+',
resizable='+resizable_str);
}
// -->
</script>
</head>
<body bgcolor="white" text="black" link="blue" vlink="purple" alink="red">
<p><a href="javascript:na_open_window('win', 'http://psicopompus.tistory.com/', 0, 0, 1024, 768, 0, 0, 0, 0, 1)">새창으로 열기</a></p>
</body>
</html>

빨강색 부분은 새 창으로 띄울 주소가 들어가는 부분이고, 파랑색 부분은 새 창의 사이즈를 지정하는 부분입니다. 마지막으로 분홍색 부분은 링크 부분이 되겠죠?