![]() |
|
||||||||||
|
|||||
|
Регистрация: Oct 2001
Сообщений: 16
|
Помогите, пожалуйста, со следующей проблемой. У меня есть плывущий вверх текст, который идет фактически циклом. Я хочу его остановить при наведении мыши на ссылку бегущего текста и чтобы он снова заработал с того же места как только я мышь уберу.
У меня это работает под нетскейпом, но не получается для эксплорера. Вот сам скрипт: <script language="JavaScript1.2"> var marqueewidth=130 var marqueeheight=150 var speed=1 var start=2 var marqueecontents='<font size=-1><div class="date_news" align="right"><font color="B8CB0D"><b>23.02.2002</b></font></div><div class="description_news" align=justify><font color="#00BC00"><a href=news1.htm class=dn onmouseover="pause();" onmouseout="go();">something interesting happened in the Java community</a></font><br><br></div><div class="date_news" align="right"><font color="B8CB0D"><b>15.02.2002</b></font></div><div class="description_news" align=justify><font color="#00BC00"><a href=news2.htm class=dn onmouseover="pause();" onmouseout="go();">a new piece of software has been developed that will revolutionise the world</a></font></div><br><div class="date_news" align="right"><font color="B8CB0D"><b>03.02.2002</b></font></div><div class="description_news" align=justify><font color="#00BC00"><a href=news3.htm class=dn onmouseover="pause();" onmouseout="go();">a new piece of software has been developed that will revolutionise the world</a></font></div></font>' if (document.all) document.write('<marquee direction="up" scrollAmount='+speed+' style="width:'+marqueewidth+';height:'+marqueeheight+'">'+marqueecontents+'</marquee>') function regenerate(){ speed=0; window.location.reload() } function regenerate2(){ if (speed>0){ if (document.layers){ setTimeout("window.onresize=regenerate",450) intializemarquee() } } } function intializemarquee(){ document.cmarquee01.document.cmarquee02.document.write(marqueecontents) document.cmarquee01.document.cmarquee02.document.close() thelength=document.cmarquee01.document.cmarquee02.document.height if (speed>0){ scrollit() } } function scrollit(){ if (document.cmarquee01.document.cmarquee02.top>=thelength*(-1)){ document.cmarquee01.document.cmarquee02.top-=speed setTimeout("scrollit()",100) } else{ document.cmarquee01.document.cmarquee02.top=marqueeheight if (speed>0){ scrollit() } } } function pause(){ speed=0; start=0; } function go(){ speed=1; start=2; } window.onload=regenerate2 </script> <ilayer width=&{marqueewidth}; height=&{marqueeheight}; name="cmarquee01"> <layer name="cmarquee02" width=&{marqueewidth}; height=&{marqueeheight};></layer> </ilayer> <!-- /News --> Последний раз редактировалось abbat; 25.02.2002 в 17:57. |
|
|||||
|
Ветеран форума
|
нифига себе...! ты где такой скрипт нарыл? =) |
![]() |
Часовой пояс GMT +4, время: 09:33. |
|
|
« Предыдущая тема | Следующая тема » |
|
|