Версия для печати темы
Нажмите сюда для просмотра этой темы в оригинальном формате |
Форум программистов > JavaScript: для новичков > нужна помощь с java redirect |
Автор: triff 15.9.2008, 14:09 |
господа, изрядное время у же бьюсь головой об стенку ![]() ![]() имеется следующий скрипт тупо скачаный где-то в нете: <html> <head> </head> <body> <script> var count=0 function dothis(){ setTimeout("document.wheel.wheel2.selectedIndex =1000",100) setTimeout("document.wheel.wheel2.selectedIndex =count",200) setTimeout("document.wheel.wheel2.selectedIndex =1000",300) setTimeout("document.wheel.wheel2.selectedIndex =count",400) setTimeout("document.wheel.wheel2.selectedIndex =1000",500) setTimeout("document.wheel.wheel2.selectedIndex =count",600) setTimeout("window.location=document.wheel.wheel2.options[document.wheel.wheel2.selectedIndex].value",800) } function animate(){ var countfinal=Math.round(Math.random()*(document.wheel.wheel2.length-1)) document.wheel.wheel2.selectedIndex =count if (count==countfinal){ dothis() return } if (count<document.wheel.wheel2.length) count++ else count=0 setTimeout("animate()",50) } </script> <form method="POST" name="wheel"> <div align="center"><center><p><select name="wheel2" size="8"> <option value="http://dynamicdrive.com">Dynamic Drive</option> <option value="http://www.cnn.com">CNN</option> <option value="http://www.news.com">News.com</option> <option value="http://www.techweb.com">Tech Web</option> <option value="http://www.freewarejava.com">Freewarejava.com</option> <option value="http://www.virtualis.com/vr/gchiang">Virtualis Web Hosting</option> <option value="http://www.geocities.com">Geocities</option> <option value="http://www.abcnews.com">ABCnews.com</option> </select></p> </center></div><div align="center"><center><p><input type="button" value="Spin wheel!" name="B1" onClick="animate()"></p> </center></div> </form> </body> </head> </html> Тоесть кнопка с колесом и переодресацией на случайный сайт. суть вопроса: можно ли сделать так чтоб случайный сайт грузился в ифрейм, который будет ниже на странице, а не происходил переход. и второе чтоб при повторном нажатии "spin wheel" следущий сайт грузился в ифрейм. страница должен быть .htm ili .html незнаю что делать..... ![]() |
Автор: chertoss 15.9.2008, 16:53 | ||
тебе типа этого нужно? я не понял просто суть.. |
Автор: triff 15.9.2008, 23:45 |
![]() ![]() ![]() ![]() Добавлено через 4 минуты и 23 секунды а надобыло всего 2 строчки сделать........эхх...... ![]() |