롤링 form을 이용
로빈아빠
본문
롤링 form을 이용
Roll_Fix.js
<!-- 롤링 --> <form name='visual'> <input type='hidden' name='visual_data' value=" <table> <tr> <td height='16' style='line-height:1;'>? [01]롤링 돌라갑니다......</td> </tr> </table> <table> <tr> <td height='16' style='line-height:1;'>? [02]롤링 돌라갑니다......</td> </tr> </table> <table> <tr> <td height='16' style='line-height:1;'>? [03]롤링 돌라갑니다......</td> </tr> </table> <table> <tr> <td height='16' style='line-height:1;'>? [04]롤링 돌라갑니다......</td> </tr> </table> <table> <tr> <td height='16' style='line-height:1;'>? [05]롤링 돌라갑니다......</td> </tr> </table> <table> <tr> <td height='16' style='line-height:1;'>? [06]롤링 돌라갑니다......</td> </tr> </table> <table> <tr> <td height='16' style='line-height:1;'>? [07]롤링 돌라갑니다......</td> </tr> </table> "> </form> <script type='text/javascript' src='./Roll_Fix.js'></script> <table> <tr> <td valign='top' width='100%' height='100' style='line-height:19px;' id='notice_sc'> <div style='width: 400px; height:100px; position: absolute; overflow:hidden;' onMouseover='lMouseOver=0' onMouseout='lMouseOver=1' id='scroll_image'> <script>startscroll_fix();</script> </div> </td> </tr> </table>
Roll_Fix.js
var scrollerheight2=200; // 스크롤러의 세로 var s_tmp2 = 0, s_amount2 = 20; var total_area2=0,wait_flag2=true; var lMouseOver = 1; var scrollspeed2 = 1; // Scrolling 속도 var waitingtime2 = 3000; // 멈추는 시간 var scroll_content2=new Array(); var startPanel2=0, n_panel2=0, i=0; function startscroll_fix() { // 스크롤 시작 i=0; for (i in scroll_content2) n_panel2++; n_panel2 = n_panel2 -1 ; startPanel = 0; if(startPanel2 == 0) { i=0; for (i in scroll_content2) insert_area2(total_area2, total_area2++); // area 삽입 } else if(startPanel2 == n_panel2) { insert_area2(startPanel2, total_area2); total_area2++; for (i=0; i<startPanel2; i++) { insert_area2(i, total_area2); // area 삽입 total_area2++; } } else if((startPanel2 > 0) || (startPanel2 < n_panel2)) { insert_area2(startPanel2, total_area2); total_area2++; for (i=startPanel2+1; i<=n_panel2; i++) { insert_area2(i, total_area2); // area 삽입 total_area2++; } for (i=0; i<startPanel2; i++) { insert_area2(i, total_area2); // area 삽입 total_area2++; } } window.setTimeout("scrolling2()",waitingtime2); } function scrolling2(){ // 실제로 스크롤 하는 부분 if (lMouseOver && wait_flag2) { for (i=0;i<total_area2;i++){ tmp = document.getElementById('scroll_area2'+i).style; tmp.top = parseInt(tmp.top)-scrollspeed2; if (parseInt(tmp.top) <= -scrollerheight2){ tmp.top = scrollerheight2*(total_area2-1); } if (s_tmp2++ > (s_amount2-1)*scroll_content2.length){ wait_flag2=false; window.setTimeout("wait_flag2=true;s_tmp2=0;",waitingtime2); } } } window.setTimeout("scrolling2()",1); } function insert_area2(idx, n){ // area 삽입 var html='<div style="left: 0px; width: 100%; position: absolute; top: '+(scrollerheight2*n)+'px" id="scroll_area2'+n+'">\n'; html+=scroll_content2[idx]+'\n'; html+='</div>\n'; document.write(html); } scroll_content2[0]= document.visual.visual_data.value; scroll_content2[1]= document.visual.visual_data.value;
관련링크
댓글목록
등록된 댓글이 없습니다.