Contents

Develop
2003.04.23 10:52

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

조회 수 6998 댓글 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
번호 분류 제목 글쓴이 날짜 조회 수
789 Etc [svn] 콘솔에서 svn 사용시 레티나용 이미지 add 안될 때.. hooni 2013.09.25 37503
788 System/OS [mac] SVN 1.8 업데이트 방법 hooni 2013.09.24 14573
787 Develop [ios] 간단한 방법으로 OS버전 확인하기. hooni 2013.09.24 13318
786 Etc 영어. 외우면 도움되는 필수영어회화 표현 file hooni 2013.09.09 20956
785 Develop [ios] Hybrid 앱 스터디 발표 자료 file hooni 2013.09.06 13717
784 Develop [python] 애니팡, 캔디팡 매크로 file hooni 2013.09.06 17337
783 Develop [ios] None IB vs. StoryBoard 샘플 소스 file hooni 2013.09.06 16937
782 Develop [ios] 앱에서 다른 앱 실행시키기 file hooni 2013.09.05 18541
781 Etc [link] 유용한 사이트 링크. hooni 2013.08.19 71469
780 Etc 베지어 곡선 (Bezier curve) file hooni 2013.08.18 221494
779 Etc [web] 제로보드 XE 템플릿에서 if문에 대해서 알아봅시다 hooni 2013.08.16 19817
778 Develop 아이 훌레시 작업중 ㅋㅋ secret hooni 2013.08.09 0
Board Pagination Prev 1 ... 28 29 30 31 32 33 34 35 36 37 ... 98 Next
/ 98