Develop
2003.04.23 10:52

[js] 점점 커지는 새창..

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

단축키

Prev이전 문서

Next다음 문서

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

단축키

Prev이전 문서

Next다음 문서

크게 작게 위로 아래로 댓글로 가기 인쇄
## 새창 띄우는 스크립트..
<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>

?

List of Articles
번호 분류 제목 글쓴이 날짜 조회 수
137 PPT [doc] 정보보호이론 강의자료 (중앙대꺼..) 2 file hooni 2013.04.23 24844
136 Etc 영어. 외우면 도움되는 필수영어회화 표현 file hooni 2013.09.09 24949
135 Develop [c++] MD5 구현 소스.. 퍼움.. file hooni 2013.04.23 25114
134 Develop [ios] 아이폰 개발 총정리.. file hooni 2013.04.23 25127
133 Develop [vb] 문자열에서 태그 제거함수 (Visual Basic) file hooni 2013.04.23 25604
132 Etc 엑셀 함수 총 정리 ㅎㅎ file hooni 2013.06.05 25674
131 Develop [doc] Json Framework 설치와 사용 file hooni 2013.04.23 25813
130 System/OS [linux] 리눅스, 유닉스 CPU 이용률 확인.. hooni 2013.04.23 25888
129 Etc 스마트폰 보안 해외 발생 사례~ file hooni 2013.04.23 26175
128 PPT [ppt] Equation Solving 발표 자료 (@PWE랩 톡데이 2011.07.26) file hooni 2013.04.23 26222
127 System/OS [windows] 최근 열어본 문서목록 안나오게 하는 방법 hooni 2013.04.23 26423
126 Develop [c#] 웹문서 소스(html) 긁어오기 file hooni 2013.04.23 26592
125 Develop [ios] 구분자로 문자열 자르기 (split) hooni 2013.04.23 26998
124 Develop GCM 사용하기 3 (JSP로 GCM 푸시 서버 만들기) 4 file hooni 2013.07.06 27144
123 Develop [js] 모바일웹에서 이미지 저장하는거 (context menu) 막기 hooni 2013.04.23 27263
122 Develop [c#] 간단한 소켓통신 예제.. hooni 2013.04.23 27593
Board Pagination Prev 1 ... 64 65 66 67 68 ... 74 Next
/ 74