Develop
2003.04.23 10:52
[js] 점점 커지는 새창..
조회 수 7019 댓글 0
## 새창 띄우는 스크립트..
<script language="JavaScript">
<!--
function newin(width,height,url,name,opt) {
var scroll = (opt == "no_scroll") ? "no" : "yes";
msgWindow=window.open(url,name,'statusbar=no,scrollbars='+scroll+',status=no,resizable=yes,width='+width+',height='+height)
}
function newin_menu(width,height,url,name) {
msgWindow=window.open(url,name,'toolbar=yes,statusbar=no,scrollbars=yes,status=yes,resizable=yes,width='+width+',height='+height)
}
// -->
</script>
## 사용 예
<a href="javascript:newin(WIDTH, HEIGHT, 'URL','simple_view')">클릭</a>
## 대상 url 파일에 삽입될 내용..
<script language='JavaScript'>
self.window.focus();
self.resizeTo(0,0);
self.moveTo(50,30); // moveTo(x,y); 에서 x와 y좌표, 창의 위치
bigger_win(630, 520);
function bigger_win(width, height) {
var long_leng = (width > height) ? width: height;
var tmp_width = 0;
var tmp_height = 0;
var cnt_per = 50;
for(i=0;i<cnt_per;i++) {
if(tmp_width < width) tmp_width += (width/cnt_per);
if(tmp_height < height) tmp_height += (height/cnt_per);
self.resizeTo(tmp_width, tmp_height);
}
self.resizeTo(width, height);
self.window.focus();
}
function newin(width,height,url,name,opt) {
var scroll = (opt == 'no_scroll') ? 'no' : 'yes';
msgWindow=window.open(url,name,'statusbar=no,scrollbars='+scroll+',status=no,resizable=yes,width='+width+',height='+height)
}
</script>
번호 | 분류 | 제목 | 글쓴이 | 날짜 | 조회 수 |
---|---|---|---|---|---|
781 | Develop | [c] 가위 바위 보 서버, 클라이언트 소스코드 | hooni | 2003.04.23 | 8208 |
780 | Develop | [c] fork() 시스템 콜 사용 방법. | hooni | 2003.04.23 | 27634 |
779 | Develop | [c] 소켓 프로그래밍 요약.. | hooni | 2003.04.23 | 6989 |
778 | Develop | [c] 소켓주소 구조체에 대해.. | hooni | 2003.04.23 | 6754 |
777 | Develop | [c] 소켓의 세가지 동작모드 | hooni | 2003.04.23 | 6934 |
776 | Develop | [c] 컴파일러 DFA구현^^ 입력 받아 실행 4 | hooni | 2003.04.23 | 8133 |
775 | Develop | [c] OpenGL 시어핀스키 가스킷(p.73 - 첫시간) | hooni | 2003.04.23 | 8770 |
774 | Develop | [c] 시어핀스키 가스킷..(p.582, A.2 - 두번째) | hooni | 2003.04.23 | 7521 |
773 | Develop | [c] 약수/최대공약수/완전수 알고리즘 | hooni | 2003.04.23 | 8889 |
772 | Develop | [c] 프로그래밍의 전반적인 설명 ppt | hooni | 2003.04.23 | 7697 |
771 | Develop | [jsp] HelloServlet 출력문 | hooni | 2003.04.23 | 7831 |
770 | Develop | [jsp] Get방식, Post방식 전송 예제.. | hooni | 2003.04.23 | 13789 |