SHsoft - 쉐어에드(공유광고) SHshop Pro 쇼핑몰 제작, 홈페이지 제작-JAVASCRIPT 게시판

본문 바로가기
JAVASCRIPT
개발자를 위한 온라인 커뮤니티  
HOME > JAVASCRIPT

 

JAVASCRIPT
팝업아 놀자~~
작성자 : 관리자
조회 : 285
등록일 : 2016-02-04 (211.169.138.253) , 추천 : 0

팝업아 놀자~~

팝업아 놀자~~

 

<SCRIPT LANGUAGE='JavaScript'>

<!--

 var winWidth  = 200;

 var winWidth2 = 400;

 var winHeidht = 350;

 var left      = (screen.width  - winWidth)/3;

    var top       = (screen.height - winWidth)/3;

 var left2     = (left+winWidth+7);

 var Interval_ = 1000; 

 var IntervalT = 1000; 

 var winPopup3;

 var winPopup1 = window.open('','winPopup1','width='+winWidth+', height='+winHeidht+', top='+top+', left='+left+', scrollbars=no');

 var winPopup2 = window.open('','winPopup2','width='+winWidth2+', height='+winHeidht+', top='+top+', left='+left2+', scrollbars=no');

 window.setTimeout('window_action_right()',Interval_);

 

 winPopup1.document.write("<html><head><TITLE> 팝업 1 </TITLE></head><body style='margin:5;background-color:#FF8000;'></body></html>");

 winPopup2.document.write("<html><head><TITLE> 팝업 2 </TITLE></head><body style='margin:5;background-color:#46A3FF;'></body></html>");

 

 //winPopup1.document.write('<div id=document1 name=document1 contentEditable='false' style='width:100%;height:100%;overflow:auto;' frameborder=1></div>');

 

 function window_action_right(){

  for (i=0; i<20; i++){

   winPopup2.moveBy(i,0);

   winPopup2.resizeBy(-i,0);

  }

  for (i=0; i<20; i++){

   winPopup1.resizeBy(i,0);

  }

  //window.setTimeout('Text_print('+0+')',IntervalT);

  window.setTimeout('window_action_left()',Interval_);

 }

 function window_action_left(){

  for (i=0; i<20; i++){

   winPopup1.resizeBy(-i,0);

  }

  for (i=0; i<20; i++){

   winPopup2.moveBy(-i,0);

   winPopup2.resizeBy(i,0);

  }

  //window.setTimeout('Text_print('+1+')',IntervalT);

  window.setTimeout('window_action1()',Interval_);

 }

 function window_action1(){

  for (i=0; i<20; i++){

   winPopup2.moveBy(i,0);

   winPopup2.resizeBy(-i,0);

  }

  for (i=0; i<5; i++){

   winPopup1.resizeBy(i,0);

  }

  //window.setTimeout('Text_print('+1+')',IntervalT);

  window.setTimeout('NewWindow()',Interval_);

 }

 function NewWindow(){

  this.winPopup3 = window.open('','winPopup3','width='+(winWidth-30)+', height='+winHeidht+', top='+top+', left='+(left+220)+', scrollbars=no');

  winPopup3.document.write("<html><head><TITLE> 팝업 3 </TITLE></head><body style='margin:5;background-color:#FF0080;'></body></html>");

  window.setTimeout('window_action2()',Interval_);

 }

 function window_action2(){

  for (i=0; i<15; i++){

   winPopup2.moveBy(i,0);

   winPopup2.resizeBy(-i,0);

  }

  for (i=0; i<20; i++){

   winPopup1.resizeBy(-i,0);

  }

  for (i=0; i<20; i++){

   winPopup3.moveBy(-(i/2),0);

   winPopup3.resizeBy(i,0);

  }

  window.setTimeout('window_action3()',Interval_);

 }

 function window_action3(){

  for (i=0; i<25; i++){

   winPopup3.moveBy((i/2.26),0);

   winPopup3.resizeBy(-i,0);

  }

  for (i=0; i<16; i++){

   winPopup2.moveBy(-i,0);

   winPopup2.resizeBy(i,0);

  }

  for (i=0; i<16; i++){

   winPopup1.resizeBy(i,0);

  }

  window.setTimeout('window_action4()',Interval_);

 }

 function window_action4(){

  for (i=0; i<3; i++) winPopup2.moveBy(0,i);

  for (i=0; i<3; i++) winPopup1.moveBy(0,i);

  for (i=0; i<3; i++) winPopup3.moveBy(0,-i);

  window.setTimeout('window_action5()',Interval_);

 }

 function window_action5(){

  for (i=0; i<3; i++) winPopup2.moveBy(0,-i);

  for (i=0; i<3; i++) winPopup1.moveBy(0,-i);

  for (i=0; i<3; i++) winPopup3.moveBy(0,i);

  window.setTimeout('window_action6()',Interval_);

 }

 function window_action6(){

  for (i=0; i<20; i++){

   winPopup1.moveBy(0,-i);

   winPopup1.resizeBy(0,-i);

   winPopup1.resizeBy(0,i);

  }

  for (i=0; i<20; i++){

   winPopup2.moveBy(0,-i);

   winPopup2.resizeBy(0,-i);

   winPopup2.resizeBy(0,i);

  }

  //window.setTimeout('Text_print('+2+')',3000);

  window.setTimeout('window_action7()',Interval_);

 }

 function window_action7(){

  for (i=0; i<20; i++){

   winPopup1.moveBy(0,i);

   winPopup1.resizeBy(0,-i);

   winPopup1.resizeBy(0,i);

  }

  for (i=0; i<20; i++){

   winPopup2.moveBy(0,i);

   winPopup2.resizeBy(0,-i);

   winPopup2.resizeBy(0,i);

  }

  window.setTimeout('window_action8()',Interval_);

 }

 function window_action8(){

  for (i=0; i<20; i++){

   winPopup1.moveBy(-i,0);

   winPopup1.resizeBy(i,0);

   winPopup1.resizeBy(-i,0);

   winPopup3.moveBy(-i,0);

   winPopup3.resizeBy(i,0);

   winPopup3.resizeBy(-i,0);

   winPopup2.moveBy(-i,0);

   winPopup2.resizeBy(i,0);

   winPopup2.resizeBy(-i,0);

  }

  //window.setTimeout('window_action9()',Interval_);

 }

 </script>

 

 

 

 

 

[보기]  

JAVASCRIPT 목록
이름 내용 등록일
댓글(comment)
* 표시가 있는 부분은 필수 입력 사항입니다.
JAVASCRIPT
*
*
비밀글
* 웹에디터 시작
상호 : SHsoft | 대표 : 윤상현 | 팩스 : 070-7501-7475 | 개인정보책임자 : 윤상현
이메일 : shsoft.app@gmail.com | 사업자 등록번호 : 125-40-00023 | 주소 : 인천시 부평구 시장로 33 7층 9호
Copyright © 2015 SHsoft All rights reserved.