Contents

Develop
2003.04.23 10:52

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

Views 7024 Comment 0
?

Shortcut

PrevPrev Article

NextNext Article

Larger Font Smaller Font Up Down Go comment Print
?

Shortcut

PrevPrev Article

NextNext Article

Larger Font Smaller Font Up Down Go comment Print
## 새창 띄우는 스크립트..
<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
No. Category Subject Author Date Views
685 Develop [ios] Xcode를 사용해서 Static Library 만들기 (시뮬레이터 + 디바이스) file hooni 2015.01.03 3408
684 Develop [ios] Thread Loop 내에서 UI 업데이트 방법 hooni 2015.01.03 929
683 Develop [ios] UIView 계층구조 hooni 2015.01.03 1230
682 Develop [ios] UIWebView를 이용한 로컬 HTML 파일 표시 file hooni 2015.01.02 1350
681 Develop [android] 안드로이드 동영상 스트리밍 예제 2 hooni 2015.01.02 4928
680 Develop [java] netty (비동기 이벤트 방식 네트워크 프레임워크) 사용법 #2 (client) hooni 2015.01.02 2135
679 Develop [java] netty (비동기 이벤트 방식 네트워크 프레임워크) 사용법 #1 (server) 1 hooni 2015.01.02 2325
678 Develop ZBar 라이브러리를 이용한 바코드 스캔 앱 개발하기 file hooni 2015.01.01 1736
677 Develop [ios] 비동기 블럭 코드 예제 hooni 2014.11.21 906
676 Develop [ios] 스크린 캡쳐 (전원버튼 + 홈버튼) 호출 알아내기 hooni 2014.11.19 1660
675 Develop [android] 가속도 센서를 이용한 흔듦(Shake) 감지 file hooni 2014.11.04 2013
674 Develop [web] 더 빠른 웹을 위한 프로토콜, 'HTTP/2' file hooni 2014.10.20 1770
Board Pagination Prev 1 ... 9 10 11 12 13 14 15 16 17 18 ... 71 Next
/ 71