Develop
2003.04.23 10:52
[js] 점점 커지는 새창..
조회 수 6998 댓글 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>
번호 | 분류 | 제목 | 글쓴이 | 날짜 | 조회 수 |
---|---|---|---|---|---|
429 | Develop | [c] 파일(int fd)에서 개행문자 단위로 읽기 by 후리자 | hooni | 2013.04.23 | 7152 |
428 | Develop | [c++] template 사용예 | hooni | 2003.04.23 | 7147 |
427 | Develop | [java] 컴포넌트 배치 ㅡ.,ㅡ; | hooni | 2003.04.23 | 7147 |
426 | Develop | [c] 확인해 볼거.. ㅡ,.ㅡ; | hooni | 2013.04.23 | 7145 |
425 | Develop | [web] URL 인코딩 방법.. 테이블.. ㅋㅋ | hooni | 2013.04.23 | 7142 |
424 | Develop | [c] 바로 보고 정리할 것.. ㅋㄷㅋㄷ | hooni | 2013.04.23 | 7131 |
423 | Develop | [asp] 폼메일 예제와 메일 포워딩 프로그램 | hooni | 2013.04.23 | 7129 |
422 | Develop | [c] 달팽이 배열? 인지 먼지.. ㅋㅋ | hooni | 2013.04.23 | 7128 |
421 | Develop | [ios][swift] 초간단 카달로그 앱 (Catalog App) | hooni | 2016.06.27 | 7120 |
420 | Develop | [js] 여러가지 트리(tree) 모음.. ㅋㅋ | hooni | 2013.04.23 | 7120 |
419 | Develop | [ajax] 이벤트 코드 생성기 작업중.. ㅋㅋ | hooni | 2013.04.23 | 7116 |
418 | Develop | [c] 문자열 뒤집기 초간단 샘플 코드 ㅎㅎ | hooni | 2013.04.23 | 7114 |