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
번호 분류 제목 글쓴이 날짜 조회 수
393 Etc [link] 유용한 사이트 링크. hooni 2013.08.19 71465
392 Develop [ios] 앱에서 다른 앱 실행시키기 file hooni 2013.09.05 18539
391 Develop [ios] None IB vs. StoryBoard 샘플 소스 file hooni 2013.09.06 16935
390 Develop [python] 애니팡, 캔디팡 매크로 file hooni 2013.09.06 17330
389 Develop [ios] Hybrid 앱 스터디 발표 자료 file hooni 2013.09.06 13715
388 Etc 영어. 외우면 도움되는 필수영어회화 표현 file hooni 2013.09.09 20954
387 Develop [ios] 간단한 방법으로 OS버전 확인하기. hooni 2013.09.24 13316
386 System/OS [mac] SVN 1.8 업데이트 방법 hooni 2013.09.24 14571
385 Etc [svn] 콘솔에서 svn 사용시 레티나용 이미지 add 안될 때.. hooni 2013.09.25 37501
384 Develop [ios] UIView에서 상위 UIViewController 가져오기 hooni 2013.09.27 20161
383 Develop [ios] GCD 변수 사용 예제 hooni 2013.10.01 12117
382 System/OS [linux] 우분투 APM + phpmyadmin 설치 hooni 2013.10.07 49328
Board Pagination Prev 1 ... 61 62 63 64 65 66 67 68 69 70 ... 98 Next
/ 98