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>
번호 | 분류 | 제목 | 글쓴이 | 날짜 | 조회 수 |
---|---|---|---|---|---|
753 | Develop | [ios][swift] 초간단 카달로그 앱 (Catalog App) | hooni | 2016.06.27 | 7120 |
752 | Develop | [c] 달팽이 배열? 인지 먼지.. ㅋㅋ | hooni | 2013.04.23 | 7128 |
751 | Develop | [asp] 폼메일 예제와 메일 포워딩 프로그램 | hooni | 2013.04.23 | 7129 |
750 | Develop | [c] 바로 보고 정리할 것.. ㅋㄷㅋㄷ | hooni | 2013.04.23 | 7131 |
749 | Develop | [web] URL 인코딩 방법.. 테이블.. ㅋㅋ | hooni | 2013.04.23 | 7142 |
748 | Develop | [c] 확인해 볼거.. ㅡ,.ㅡ; | hooni | 2013.04.23 | 7145 |
747 | Develop | [java] 컴포넌트 배치 ㅡ.,ㅡ; | hooni | 2003.04.23 | 7147 |
746 | Develop | [c++] template 사용예 | hooni | 2003.04.23 | 7147 |
745 | Develop | [c] 파일(int fd)에서 개행문자 단위로 읽기 by 후리자 | hooni | 2013.04.23 | 7152 |
744 | Develop | [php] 탐색기와 같은 다이나믹 트리(xml/xsl 이용) | hooni | 2013.04.23 | 7153 |
743 | Develop | [js] 후리자(영규) 스타일들.. | hooni | 2013.04.23 | 7154 |
742 | Develop | [c++] 트리컨트롤 예제1 ㅋㅋ | hooni | 2013.04.23 | 7171 |