메뉴 건너뛰기

조회 수 7112 추천 수 0 댓글 0
?

단축키

Prev이전 문서

Next다음 문서

크게 작게 위로 아래로 댓글로 가기 인쇄
?

단축키

Prev이전 문서

Next다음 문서

크게 작게 위로 아래로 댓글로 가기 인쇄
script type="text/javascript">
function windowOpen(e,width,height){
  var url = e.href;
  window.open(url,'newWindow','width='+width+', height='+height+',top=0, left=0,toolbar=0, status=0, menubar=0, scrollbars=0, resizable=0,');
  //window.open(url,'newWindow','width='+width+', height='+height+',top='+((screen.availHeight - height)/2 - 40) +', left='+(screen.availWidth - width)/2+',toolbar=0, directories=0, status=0, menubar=0, scrollbars=0, resizable=0');
}
< /script>

< a href="http://www.daum.net" onclick="windowOpen(this,300,200); return false;" target="_blank">Window Open</a>





window.open(url, name, features, replace);

url : 표시 할 문서의 URL을 지정합니다.
name : 새창의 윈도우의 이름을 지정합니다. 공백문자를 사용할 수 없습니다. 표시되는 부분은 없습니다. 링크에 대한 이름이라고 생각하시면 됩니다.
features : 기능. 추가 할 수 있는 옵션 들입니다.
replace : URL에 대해 새항목을 만들거나 history를 대체합니다.(안사용해서 잘 모르겠네요.)

height = number
- 높이값
width = number
- 너비값
location = { yes | no | 1 | 0 }
- 주소창 제거. 보안상 이유로 최신 브라우저에서 사용 못함.
menubar = { yes | no | 1 | 0 }
- 도구모음 노출 여부
resizable = { yes | no | 1 | 0 }
- 창 크기 사용자 조절 여부
scrollbars = { yes | no | 1 | 0 }
- 스크롤 바 노출 여부
status = { yes | no | 1 | 0 }
- 하단 상태 표시줄 노출 여부
toolbar = { yes | no | 1 | 0 }
- 툴바 노출 여부
top = number
- 상단부터의 위치값
left = number
- 좌측부터의 위치값

출처
https://developer.mozilla.org/en-US/docs/Web/API/Window/open
https://msdn.microsoft.com/en-us/library/ms536651(v=vs.85).aspx

하단 정보를 입력할 수 있습니다

© k2s0o1d4e0s2i1g5n. All Rights Reserved