Ссылка меняет цвет при наведении курсора
<spoiler>Работает в любом браузере, меняет стили всем ссылкам, игнорирует стили заданные в CSS.
Посмотреть
<html> <head> <title>Ссылка меняет цвет при наведении курсора </title> </head> <body> <script LANGUAGE="JScript"> <!-- ua=navigator.userAgent; v=navigator.appVersion.substring(0,1); if ((ua.lastIndexOf("MSIE")!=-1) && (v='4')) { document.onmouseover= highlight; document.onmouseout= unhighlight; } function highlight() { src = event.toElement; if (src.tagName == "A") { src.oldcol = src.style.color; src.style.color = "#ffcc00"; } } function unhighlight() { src=event.fromElement; if (src.tagName == "A") { src.style.color = src.oldcol; }} --> </script> <a target="_top" href="https://scripts.mybb.ru/">Ссылка</a><br> </body> </html>
<endspoiler>
Ссылка плавно меняет цвет при наведении курсора
<spoiler>
Посмотреть
<html> <head> <title>Ссылка плавно меняет цвет при наведении курсора.</title> <script language="Javascript"> <!--// document.onmouseover = domouseover; document.onmouseout = domouseout; function domouseover() { if(document.all){ srcElement = window.event.srcElement; if (srcElement.className.indexOf("fade") > -1) { var linkName = srcElement.name; fadein(linkName); } } } function domouseout() { if (document.all){ srcElement = window.event.srcElement; if (srcElement.className.indexOf("fade") > -1) { var linkName = srcElement.name; fadeout(linkName); } } } function makearray(n) { this.length = n; for(var i = 1; i <= n; i++) this[i] = 0; return this; } hexa = new makearray(16); for(var i = 0; i < 10; i++) hexa[i] = i; hexa[10]="a"; hexa[11]="b"; hexa[12]="c"; hexa[13]="d"; hexa[14]="e"; hexa[15]="f"; function hex(i) { if (i < 0) return "00"; else if (i > 255) return "ff"; else return "" + hexa[Math.floor(i/16)] + hexa[i%16];} function setbgColor(r, g, b, element) { var hr = hex(r); var hg = hex(g); var hb = hex(b); element.style.color = "#"+hr+hg+hb; } function fade(sr, sg, sb, er, eg, eb, step, direction, element){ for(var i = 0; i <= step; i++) { setTimeout("setbgColor(Math.floor(" +sr+ " *(( " +step+ " - " +i+ " )/ " +step+ " ) + " +er+ " * (" +i+ "/" +step+ ")),Math.floor(" +sg+ " * (( " +step+ " - " +i+ " )/ " +step+ " ) + " +eg+ " * (" +i+ "/" +step+ ")),Math.floor(" +sb+ " * ((" +step+ "-" +i+ ")/" +step+ ") + " +eb+ " * (" +i+ "/" +step+ ")),"+element+");",i*step); } } function fadeout(element) { fade(255,150,0, 255,255,255, 30, 1, element); } function fadein(element) { fade(255,255,255, 255,150,0, 23, 1, element); } --> </script> </head> <body> <a href="https://scripts.mybb.ru" name="fading_link_1" class="fade">Ссылка</a> </body> </html>
<endspoiler>
Ссылка светится при наведении курсора
<spoiler>
Посмотреть
<html> <head> <title>Ссылка светится при наведении курсора</title> <style type="text/css"> .nav { COLOR: #ffff00; FONT-FAMILY: arial; FONT-SIZE: 10pt; LEFT: 150px; POSITION: absolute; TEXT-DECORATION: none} </style> <SCRIPT language="JavaScript"> <!-- var i_strength=0 var max_strength=6 var shadowcolor="red" var timer var speed=50 var thisobj function stopfilter(thisdiv){ if (document.all) { clearTimeout(timer) thisobj=thisdiv thisobj.style.filter=" " } } function startfilter(thisdiv){ if (document.all) { clearTimeout(timer) thisobj=thisdiv morefilter() } } function morefilter(){ if (i_strength <=max_strength) { thisobj.style.filter="glow(color="+shadowcolor+", strength="+i_strength+")" i_strength++ timer = setTimeout("morefilter()",speed) } else { clearTimeout(timer) lessfilter() } } function lessfilter(){ if (i_strength >=0) { thisobj.style.filter="glow(color="+shadowcolor+", strength="+i_strength+")" i_strength-- timer = setTimeout("lessfilter()",speed) } else { clearTimeout(timer) morefilter() } } // --> </SCRIPT> </head> <body> <div class="nav" id="news" onmouseout="stopfilter(this)" onmouseover="startfilter(this)" style="TOP: 10px"><a href="https://scripts.mybb.ru" style="color: #ffff00">Ссылка</a></div> <div class="nav" id="contact" onmouseout="stopfilter(this)" onmouseover="startfilter(this)" style="TOP: 30px"><https://scripts.mybb.ru" style="color: #ffff00">https://scripts.mybb.ru</a></div> </body> </html>
<endspoiler>
Ссылка светится разными цветами при наведении курсора
<spoiler>
Посмотреть
<html> <head> <title>Ссылка меняет цвета при нахождении курсора на ней.</title> <script language="JavaScript"> <!-- // choose the colors the link-animation will rush through var newcolor=new Array("ff0000","ff3300", "ff3300","ff6600","ff6600","ff9900", "ff9900","ffcc00","ffcc00","ffff00", "ffff00","ccff00","ccff00","99ff00", "99ff00","00ff00","00ff00","00cc00", "00cc00","00cc99","00cc99","00ccff", "00ccff","0099ff","0099ff","0066ff", "0066ff","0033ff","0033ff","9900cc", "9900cc","9933cc","9933cc","cc33cc", "cc33cc","ff00cc","ff33cc","ff0066", "ff0066","ff0000") // speed of animation. Smaller means faster var pause=30 // Do not edit the values below var timer var animation_on=true var thislink var i_color=0 function startanimation(newlink) { if (document.all) { animation_on=true thislink=eval("document.all."+newlink+".style") changecolors() } } function changecolors() { if (animation_on) { if (i_color>=newcolor.length-1) { i_color=0 } thislink.color=newcolor[i_color] i_color++ timer=setTimeout("changecolors()",pause) }else { clearTimeout(timer) } } function stopanimation() { if (document.all) { animation_on=false } } --> </script> </head> <body> <DIV id="deletethisblock"><A name="link1" onMouseOver="startanimation(this.name)" onMouseOut="stopanimation()" href="https://scripts.mybb.ru"> https://scripts.mybb.ru</a> <A name="link5" onMouseOver="startanimation(this.name)" onMouseOut="stopanimation()" href="http://mybb.ru/">Создай свой форум</a><br></DIV> </body> </html>
<endspoiler>
Ссылка мерцает при наведении курсора
<spoiler>
Посмотреть
<html> <head> <title>Ссылка мерцает при наведении курсора</title> <SCRIPT> <!-- col = new Array() col[0]="000000" col[1]="111111" col[2]="222222" col[3]="333333" col[4]="444444" col[5]="555555" col[6]="666666" col[7]="777777" col[8]="888888" col[9]="999999" col[10]="AAAAAA" col[11]="BBBBBB" col[12]="CCCCCC" col[13]="DDDDDD" col[14]="EEEEEE" col[15]="FFFFFF" col[16]="FFFFFF" col[17]="DDDDDD" col[18]="CCCCCC" col[19]="BBBBBB" col[20]="AAAAAA" col[21]="999999" col[22]="888888" col[23]="777777" col[24]="666666" col[25]="555555" col[26]="444444" col[27]="333333" col[28]="222222" col[29]="111111" col[30]="000000" i_col=0 doani=1 var timer var thislink function animatelink() { if (document.all) { if (doani==1) { if (i_col<=col.length-1) { thislink.color=col[i_col] i_col++ timer=setTimeout("animatelink()",50) } else { i_col=0 timer=setTimeout("animatelink()",50) } } else { clearTimeout(timer) } } } function stopanimation() { clearTimeout(timer) thislink.color="00ff00" doani=0 } function startanimation(mylink) { clearTimeout(timer) thislink=eval("document.all."+mylink+".style") doani=1 animatelink() } // - End of JavaScript - --> </SCRIPT> </head> <body> <DIV id=mainbody style="COLOR: #000000; FONT-FAMILY: Arial; FONT-SIZE: 14pt; FONT-WEIGHT: bold; LEFT: 150px; POSITION: absolute; TOP: 20px; WIDTH: 450px"> <A href="https://scripts.mybb.ru" id="link1" onmouseout="stopanimation()" onmouseover="startanimation('link1')" target="_blank"'>JavaScript</A><br> <A href="http://mybb.ru" id="link2" onmouseout="stopanimation()" onmouseover="startanimation('link2')" target="_blank">Создай свой форум</A><br> </DIV> </body> </html>
<endspoiler>
Смена текста ссылки при наведении курсора
<spoiler>
Посмотреть
<html> <head> <title>Смена текста ссылки при наведении курсора</title> <SCRIPT language="JavaScript"> var oldtext var newtext var newlink function shownewtext(thislink,thistext) { if (document.all) { newlink=eval("document.getElementById('"+thislink+"')") newtext=thistext oldtext=newlink.childNodes[0].nodeValue newlink.childNodes[0].nodeValue=thistext; } } function showoldtext() { if (document.all) { newlink.childNodes[0].nodeValue=oldtext; } } </script> </head> <body> <DIV id="deletethis" style="position:absolute; top:10px; left:150px; background-color:white;"> <a href="https://scripts.mybb.ru" target="_blank" name="whatasillyname" onMouseOver="shownewtext(this.name,'Коллекция JavaScript')" onMouseOut="showoldtext()">scripts.mybb.ru</a></DIV> </body> </html>
<endspoiler>
Салют при наведении курсора на ссылку
<spoiler>
Посмотреть
<html> <head> <title>Салют при наведении курсора на ссылку</title> <script> <!-- var debrisnumber=40 var debriscolor=new Array() debriscolor[0]="FFAAAA" debriscolor[1]="AA0000" debriscolor[2]="770000" debriscolor[3]="AA4444" debriscolor[4]="EE4422" var x_debrispos var y_debrispos var x,y var x_random=new Array() var y_random=new Array() var max_explsteps=20 var i_explsteps=0 var i_color=0 var pause=10 function checkbrowser() { i_explsteps=0 x_debrispos=x y_debrispos=y for (i=0;i<=debrisnumber;i++) { x_random[i]=Math.ceil(40*Math.random())-20 y_random[i]=Math.ceil(40*Math.random())-20 } if (document.all) { for (i=0;i<=debrisnumber;i++) { var thisspan=eval("document.all.span"+i+".style") thisspan.visibility="VISIBLE" thisspan.posLeft=x_debrispos thisspan.posTop=y_debrispos } explode_IE() } if (document.layers) { for (i=0;i<=debrisnumber;i++) { var thisspan=eval("document.span"+i) thisspan.visibility="VISIBLE" thisspan.left=x_debrispos thisspan.top=y_debrispos } explode_NN() } } function explode_IE() { if (i_explsteps<=max_explsteps) { for (i=0;i<=debrisnumber;i++) { var thisspan=eval("document.all.span"+i+".style") thisspan.posLeft+=x_random[i] thisspan.posTop+=y_random[i] } i_explsteps++ var timer=setTimeout("explode_IE()",pause) } else { for (i=0;i<=debrisnumber;i++) { var thisspan=eval("document.all.span"+i+".style") thisspan.visibility="HIDDEN" } clearTimeout(timer) } } function explode_NN() { if (i_explsteps<=max_explsteps) { for (i=0;i<=debrisnumber;i++) { var thisspan=eval("document.span"+i) thisspan.left+=x_random[i] thisspan.top+=y_random[i] } i_explsteps++ var timer=setTimeout("explode_NN()",pause) } else { for (i=0;i<=debrisnumber;i++) { var thisspan=eval("document.span"+i) thisspan.visibility="HIDDEN" } clearTimeout(timer) } } function handlerMM(e){ x = (document.layers) ? e.pageX : document.body.scrollLeft+event.clientX y = (document.layers) ? e.pageY : document.body.scrollTop+event.clientY } if (document.layers){ document.captureEvents(Event.MOUSEMOVE); } document.onmousemove = handlerMM; // - End of JavaScript - --> </script> <style> .spanstyle { position:absolute; visibility:hidden;} </style> </head> <body> <script> <!-- Beginning of JavaScript - for (i=0;i<=debrisnumber;i++) { document.write("<div id='span"+i+"' class='spanstyle'>") document.write("<table cellpadding=0 cellspacing=0>") document.write("<tr><td bgcolor="+debriscolor[i_color]+">") document.write("<img src='emptypixel236.gif' width=3>") document.write("</td></tr></table>") document.write("</div>") i_color++ if (i_color>=debriscolor.length) {i_color=0} } // - End of JavaScript - --> </script> <DIV id="redir" style="position:absolute; top:10px; left:5px; visibility:visible;"> <div align="center"><a href="scripts.mybb.ru" onMouseOver="checkbrowser()"> scripts.mybb.ru</a></div> </DIV> </body> </html>
<endspoiler>
При наведении курсора на ссылку вокруг нее активизируется текстовая анимация
<spoiler>
Посмотреть
<html> <head> <title>При наведении на ссылку вокруг нее активизируется текстовая анимация</title> <SCRIPT language=JavaScript> document.onmouseover = domouseover; document.onmouseout = domouseout; function ismsie4() { if ((navigator.appName.indexOf("Internet Explorer") > -1) && (navigator.appVersion.indexOf("4") > -1)) { return true } else { return false } } var linkTimeout = ""; function showArrow(activeArrowID, linkName) { for (i=0;i<=2;i++) { if (i == activeArrowID) { document.all[linkName + "Arrow"][i].style.color = "white"; document.all[linkName + "Arrow"][5 - i].style.color = "white"; } else { document.all[linkName + "Arrow"][i].style.color = ""; document.all[linkName + "Arrow"][5 - i].style.color = ""; } } activeArrowID++; if (activeArrowID > 2) { activeArrowID = 0; } linkTimeout = setTimeout("showArrow(" + activeArrowID + ', "' + linkName + '"' + ")", 120); } // This is separate because... umm, it makes things flexible ;-) function hideArrows(linkName) { for (i=0;i<=2;i++) { document.all[linkName + "Arrow"][i].style.color = ""; document.all[linkName + "Arrow"][5 - i].style.color = ""; } } function domouseover() { srcElement = window.event.srcElement; if (srcElement.className.indexOf("Link") > -1) { var linkName = srcElement.id; document.all[linkName + "Bracket"][0].style.color = "black"; document.all[linkName + "Bracket"][1].style.color = "black"; showArrow(0, linkName); } } function domouseout() { srcElement = window.event.srcElement; if (srcElement.className.indexOf("Link") > -1) { var linkName = srcElement.id; hideArrows(linkName); clearTimeout(linkTimeout); document.all[linkName + "Bracket"][0].style.color = ""; document.all[linkName + "Bracket"][1].style.color = ""; } } </SCRIPT> </head> <body> <table width=400 height=40 border=0><tr><td align=center> <FONT face=Verdana size=1><FONT color=black><A id=mainArrow>></A><A id=mainArrow>></A><A id=mainArrow>></A></FONT><A id=mainBracket>[</A><A class=mainLink href="https://scripts.mybb.ru" id=main target="_top">scripts.mybb.ru</A><A id=mainBracket>]</A><FONT color=black><A id=mainArrow><</A><A id=mainArrow><</A><A id=mainArrow><</A></FONT></FONT> <FONT face=Verdana size=1><FONT color=black><A id=emailArrow>></A><A id=emailArrow>></A><A id=emailArrow>></A></FONT><A id=emailBracket>[</A><A class=emailLink href="mailto:4cooler@gmail.com" id=email target=_top>Отправить e-mail</A> <A id=emailBracket>]</A><FONT color=black><A id=emailArrow><</A><A id=emailArrow><</A><A id=emailArrow><</A></FONT></FONT> </td></tr></table> </body> </html>
<endspoiler>
При наведении на ссылку рядом с ней появляется картинка
<spoiler>
Посмотреть
<html> <head> <SCRIPT language="Javascript"> <!-- // browser_name = navigator.appName; browser_version = parseFloat(navigator.appVersion); if (browser_name == "Netscape" && browser_version >= 3.0) { roll = 'true'; } else if (browser_name == "Microsoft Internet Explorer" && browser_version >= 3.0) { roll = 'true'; } else { roll = 'false'; } function load(location){ return image; } if (roll == 'true'){ tr=new Image(); tr.src="on.gif"; //картинка } function show(where){ if (roll == 'true'){ stored=where; storedLocation=document.images[where].src; document.images[where].src="http://img.yandex.net/i/i-register.gif"; //картинка } } function hide(){ if (roll == 'true') document.images[stored].src=storedLocation; } // --> </SCRIPT> </head> <body> <IMG SRC="off.gif" NAME="im1" BORDER=0 HEIGHT=11 WIDTH=8><A HREF="https://scripts.mybb.ru" onMouseOver="show('im1')" onMouseOut="hide()" >scripts.mybb.ru</A><BR> <IMG SRC="off.gif" NAME="im2" BORDER=0 HEIGHT=11 WIDTH=8><A HREF="https://scripts.mybb.ru" onMouseOver="show('im2')" onMouseOut="hide()" >Сборник ява-скриптов</A><BR> <IMG SRC="off.gif" NAME="im3" BORDER=0 HEIGHT=11 WIDTH=8><A HREF="http://mybb.ru" onMouseOver="show('im3')" onMouseOut="hide()" >Создай свой форум</A> </body> </HTML>
<endspoiler>
При наведении курсора на ссылку в селекторах checkbox и radiobutton меняются значения
<spoiler>
Посмотреть
<html> <head> <title>Перед ссылкой в селекторах checkbox и radio меняются значения при наведении курсора на ссылку.</title> </head> <body> <form name="rolloverbox"> <input type="checkbox" name="boxes" value="ON"><a href="https://scripts.mybb.ru" onMouseover="rollovercheck(0)" onMouseout="rolloutcheck(0)">Ссылка 1</a><br> <input type="checkbox" name="boxes" value="ON"><a href="https://scripts.mybb.ru" onMouseover="rollovercheck(1)" onMouseout="rolloutcheck(1)">Ссылка 2</a><br> <input type="checkbox" name="boxes" value="ON"><a href="https://scripts.mybb.ru" onMouseover="rollovercheck(2)" onMouseout="rolloutcheck(2)">Ссылка 3</a><br><br> <input type="radio" name="boxes" value="ON"><a href="https://scripts.mybb.ru" onMouseover="rollovercheck(3)" onMouseout="rolloutcheck(3)">Ссылка 4</a><br> <input type="radio" name="boxes" value="ON"><a href="https://scripts.mybb.ru" onMouseover="rollovercheck(4)" onMouseout="rolloutcheck(4)">Ссылка 5</a><br> <input type="radio" name="boxes" value="ON"><a href="https://scripts.mybb.ru" onMouseover="rollovercheck(5)" onMouseout="rolloutcheck(5)">Ссылка 6</a> </form> <script> var thebox=document.rolloverbox function rollovercheck(whichbox){ thebox.boxes[whichbox].checked=true } function rolloutcheck(whichbox){ thebox.boxes[whichbox].checked=false } </script> </body> </html>
<endspoiler>
Плавающие ссылки
<spoiler>
Посмотреть
<html> <head> <title>Плавающие ссылки</title> <STYLE type="text/css"><!-- .line { color: #333333; font-weight: bold} --></STYLE> <SCRIPT language="JavaScript"> <!-- Beginning of JavaScript - // ATTENTION: Too many images will slow down the floating effect. var message=new Array() message[0]="https://scripts.mybb.ru" message[1]="MailTo" message[2]="Создай свой форум" // You may add a link for each message. // In case you do not want to link a message just add a '#' instead of an URL var message_link=new Array() message_link[0]="https://scripts.mybb.ru" message_link[1]="mailto:4cooler@gmail.com" message_link[2]="http://mybb.ru" // font-family for each message var message_font=new Array() message_font[0]="Times New Roman, Times, serif" message_font[1]="Impact, Arial, sans-serif" message_font[2]="Comic Sans MS, Arial, sans-serif" // font-size for each message var message_fontsize=new Array() message_fontsize[0]=28 message_fontsize[1]=25 message_fontsize[2]=30 // font-color for each message var message_fontcolor=new Array() message_fontcolor[0]="red" message_fontcolor[1]="olive" message_fontcolor[2]="blue" // font-weight for each message. Choose a value between 1 and 9 var message_fontweight=new Array() message_fontweight[0]=7 message_fontweight[1]=9 message_fontweight[2]=7 // width for each message (pixels) var message_width=new Array() message_width[0]=300 message_width[1]=200 message_width[2]=300 // average speed of the floating images. Higher means faster var floatingspeed=3 // do not edit the variables below var tempo=30 var numberofmessages=message.length-1 var stepx=new Array() var stepy=new Array() for (i=0;i<=numberofmessages;i++) { stepx[i]=randommaker(floatingspeed) stepy[i]=randommaker(floatingspeed) } var imgwidth=new Array() var imgheight=new Array() for (i=0;i<=numberofmessages;i++) { imgwidth[i]=10 imgheight[i]=10 } var i_fadestrength=new Array() var i_fadestep=new Array() var i_fadenow=new Array() var i_fadenowmax=new Array() for (i=0;i<=numberofmessages;i++) { i_fadenowmax[i]=randommaker(10)+2 i_fadestrength[i]=randommaker(90) i_fadestep[i]=1 i_fadenow[i]=0 } var x,y var marginbottom var marginleft=0 var margintop=0 var marginright var timer for (i=0;i<=numberofmessages;i++) { message_fontweight[i]=100*message_fontweight[i] } var spancontent=new Array() for (i=0;i<=numberofmessages;i++) { spancontent[i]="<table width="+message_width[i]+" cellspacing=0><tr><td valign=top>" spancontent[i]+="<span style='position: relative; font-family: "+message_font[i]+"; font-size: "+message_fontsize[i]+"pt; font-weight: "+message_fontweight[i]+"'>" spancontent[i]+="<a href='"+message_link[i]+"'>" spancontent[i]+="<font color="+message_fontcolor[i]+">" spancontent[i]+=message[i] spancontent[i]+="</a>" spancontent[i]+="</span>" spancontent[i]+="</td></tr></table>" } function setValues() { if (document.all) { marginbottom=document.body.clientHeight-5 marginright=document.body.clientWidth-5 for (i=0;i<=numberofmessages;i++) { var thisspan = eval("document.all.span"+i) thisspan.innerHTML=spancontent[i] var thisspan = eval("document.all.span"+(i)+".style") thisspan.posLeft=randommaker(marginright) thisspan.posTop=randommaker(marginbottom) } for (i=0;i<=numberofmessages;i++) { var thisspan = eval("document.all.span"+i) imgwidth[i]=thisspan.offsetWidth imgheight[i]=thisspan.offsetHeight } checkmovement() } } function randommaker(range) { rand=Math.floor(range*Math.random()) if (rand==0) {rand=Math.ceil(range/2)} return rand } function checkmovement() { if (document.all) { for (i=0;i<=numberofmessages;i++) { var thisfilter=eval("span"+i) i_fadenow[i]++ if (i_fadenow[i]>=i_fadenowmax[i]) { i_fadenow[i]=0 if (i_fadestrength[i]>=100) {i_fadestep[i]=i_fadestep[i]*-1} else if (i_fadestrength[i]<=-20) {i_fadestep[i]=i_fadestep[i]*-1} } i_fadestrength[i]+=i_fadestep[i] thisfilter.filters.alpha.opacity=Math.floor(i_fadestrength[i]) } checkposition() movepictures() timer=setTimeout("checkmovement()",tempo) } } function movepictures() { if (document.all) { for (i=0;i<=numberofmessages;i++) { var thisspan=eval("document.all.span"+(i)+".style") thisspan.posLeft+=stepx[i] thisspan.posTop+=stepy[i] } } } function checkposition() { if (document.all) { for (i=0;i<=numberofmessages;i++) { var thisspan=eval("document.all.span"+i+".style") if (thisspan.posLeft>marginright-imgwidth[i]) { thisspan.posLeft-=Math.abs(stepx[i]+1) stepx[i]=randommaker(floatingspeed)*-1 } if (thisspan.posLeft<marginleft) { thisspan.posLeft+=Math.abs(stepx[i]) stepx[i]=randommaker(floatingspeed) } if (thisspan.posTop>marginbottom-imgheight[i]) { thisspan.posTop-=Math.abs(stepy[i]) stepy[i]=randommaker(floatingspeed)*-1 } if (thisspan.posTop<margintop) { thisspan.posTop+=Math.abs(stepy[i]) stepy[i]=randommaker(floatingspeed) } } } } // - End of JavaScript - --> </SCRIPT> </head> <BODY style="width:100%;overflow-x:hidden;overflow-y:hidden"> <SCRIPT> <!-- Beginning of JavaScript - if (document.all) { for (i=0;i<=numberofmessages;i++) { document.write("<span id='span"+i+"' style='position: absolute; z-index: 100; filter: alpha(opacity=50)'></span>") document.close() } window.onload=setValues } // - End of JavaScript - --> </SCRIPT> </body> </html>
<endspoiler>
Несколько ссылок бегущей строкой в самом верху экрана
<spoiler>
Посмотреть
<html> <head> <title>Несколько ссылок бегущей строкой в самом верху экрана</title> <SCRIPT LANGUAGE="JavaScript"> <!-- // Your messages. Add as many as you like var message=new Array() message[0]="https://scripts.mybb.ru" message[1]="Помощь по скриптам!" message[2]="http://mybb.ru - создать свой форум можно здесь!" // the URLs of your messages var messageurl=new Array() messageurl[0]="https://scripts.mybb.ru" messageurl[1]="https://scripts.mybb.ru" messageurl[2]="http://mybb.ru" // the targets of the links // accepted values are '_blank' or '_top' or '_parent' or '_self' // or the name of your target-window (for instance 'main') var messagetarget=new Array() messagetarget[0]="_blank" messagetarget[1]="_blank" messagetarget[2]="_blank" // distance of the ticker to the top margin of the browser-window (pixels) var postop=0 // speed 1: lower means faster var pause=20 // speed 2: higher means faster var step=5 // font-size var fntsize=25 // font-color var fntcolor="#33ffff" // font-family var fntfamily="Verdana" // font-weight: 1 means bold, 0 means normal var fntweight=1 // do not edit the variables below var i_message=0 var timer var textwidth var textcontent="" if (fntweight==1) {fntweight="700"} else {fntweight="100"} function init() { gettextcontent() if (document.all) { screenwidth=document.body.clientWidth text.innerHTML=textcontent document.all.text.style.posTop=postop document.all.text.style.posLeft=screenwidth textwidth=text.offsetWidth scrolltext() } if (document.layers) { screenwidth=window.innerWidth document.text.document.write(textcontent) document.text.document.close() document.text.top=postop document.text.left=screenwidth textwidth=document.text.document.width scrolltext() } } function scrolltext() { if (document.all) { if (document.all.text.style.posLeft>=textwidth*(-1)) { document.all.text.style.posLeft-=step var timer=setTimeout("scrolltext()",pause) } else { changetext() } } if (document.layers) { if (document.text.left>=textwidth*(-1)) { document.text.left-=step var timer=setTimeout("scrolltext()",pause) } else { changetext() } } } function changetext() { i_message++ if (i_message>message.length-1) {i_message=0} gettextcontent() if (document.all) { text.innerHTML=textcontent document.all.text.style.posLeft=screenwidth textwidth=text.offsetWidth scrolltext() } if (document.layers) { document.text.document.write(textcontent) document.text.document.close() document.text.left=screenwidth textwidth=document.text.document.width scrolltext() } } function gettextcontent() { textcontent="<span style='position:relative;font-size:"+fntsize+"pt;font-family:"+fntfamily+";font-weight:"+fntweight+"'>" textcontent+="<a href="+messageurl[i_message]+" target="+messagetarget[i_message]+">" textcontent+="<nobr><font color="+fntcolor+">"+message[i_message]+"</font></nobr></a></span>" } window.onresize=init; // - End of JavaScript - --> </SCRIPT> </head> <body onLoad="init()"> <DIV ID="text" style="position:absolute;left:-2000px"></DIV> </body> </html>
<endspoiler>
Печатающиеся ссылки
<spoiler>
Посмотреть
<html> <head> <title>Печатающиеся ссылки.</title> </head> <script language="javascript"> <!-- var delay=20; var nextm=0; var link=1; zeilen=4; //hier angeben wieviele Zeilen du benutzt. var msg=new Array ( 'scripts.mybb.ru', 'Помощь по скриптам', 'Большое количество всевозможных скриптов', 'Посетите нас!' ); function start_ticker() { do_ticker(msg[0], 0, 1); } function do_ticker(text, pos, dir) { var out='<font face="Arial, Helvetica">[ <font color=#808080><font size=-1><A HREF="Javascript:klick()">'+text.substring(0, pos)+'</A></font></font> ]</font>'; if(navigator.appName=="Netscape") with(document.ticker.document) { open(); write(out); close(); } else ticker.innerHTML=out; pos+=dir; if(pos>text.length) setTimeout('do_ticker("'+text+'",'+pos+','+(-dir)+')', delay*100); else { if(pos<0) { if(++nextm>=msg.length) nextm=0; link=link+1 if (link>=zeilen+1) link=1; text=msg[nextm]; dir=-dir; } setTimeout('do_ticker("'+text+'",'+pos+','+dir+')', delay); } } function klick() { //hier die links. if (link==1) location.href="https://scripts.mybb.ru" //Dort Link 1 eintragen if (link==2) location.href="https://scripts.mybb.ru" //Dort Link 2 eintragen if (link==3) location.href="https://scripts.mybb.ru" //Dort Link 3 eintragen if (link==4) location.href="https://scripts.mybb.ru" //Dort Link 4 eintrage } // --> </script> <body onload="start_ticker()"> <div align="center" id="ticker" style="LEFT: 195px; POSITION: absolute; TOP: 15px"></div><br> </body> </html>
<endspoiler>
Ссылки сменяют друг друга на одном месте
<spoiler>
Посмотреть
<html> <head> Ссылки сменяют друг друга на одном месте <title>Ссылки сменяют друг друга на одном месте</title> </head> <body onload="start_news();"> <table height="19" width="50%"> <tbody> <tr><td width="50%"> <div align="left" id="ickertape"> <div align="left" class="subtickertapefont" id="subtickertape"><strong> Initializing...</strong> </div></div> <script language=JavaScript> <!-- // скорость смены ссылок var speed=1800 var news=new Array() news[0]="<a href='window.htm' target=_black><b><font color=#00FF40 style='{text-decoration: none; cursor: crosshair}'><DIV STYLE='FONT-size:12 Pt'>Дополнительное окно</DIV></font></b></a>" news[1]="<a href='infill.htm' target=_black><b><font color=#6600FF size=-1 style='{text-decoration: none; cursor: crosshair}'><DIV STYLE='FONT-size:12 pt'>Заполнение форм</DIV></font></b></a>" news[2]="<a href='game.htm' target=_black><b><font color=#FF80C0 size=-1 style='{text-decoration: none; cursor: crosshair}'><DIV STYLE='FONT-size:12 pt'>Игры</DIV></font></b></a>" news[3]="<a href='clock.htm' target=_black><b><font color=#FF0000 size=-1 style='{text-decoration: none; cursor: crosshair}'><DIV STYLE='FONT-size:12 pt'>Календари и часики</DIV></font></b></a>" news[4]="<a href='picture.htm' target=_black><b><font color=#FF33FF size=-1 style='{text-decoration: none; cursor: crosshair}'><DIV STYLE='FONT-size:12 pt'>Картинки</DIV></font></b></a>" news[5]="<a href='writ.htm' target=_black><b><font color=#996600 style='{text-decoration: none;cursor: crosshair}'><DIV STYLE='FONT-size:12 Pt'>Надписи</DIV></font></b></a>" news[6]="<a href='background.htm' target=_black><b><font color=#6600FF size=-1 style='{text-decoration: none; cursor: crosshair}'><DIV STYLE='FONT-size:12 pt'>Оформление фона</DIV></font></b></a>" news[7]="<a href='object.htm' target=_black><b><font color=#FF80C0 size=-1 style='{text-decoration: none; cursor: crosshair}'><DIV STYLE='FONT-size:12 pt'>Передвижение объекта</DIV></font></b></a>" news[8]="<a href='ball.htm' target=_black><b><font color=#6633cc size=-1 style='{text-decoration: none; cursor: crosshair}'><DIV STYLE='FONT-size:12 pt'>Передвижение мячика</DIV></font></b></a>" news[9]="<a href='orbit.htm' target=_black><b><font color=#669900 size=-1 style='{text-decoration: none; cursor: crosshair}'><DIV STYLE='FONT-size:12 pt'>Передвижение по орбите</DIV></font></b></a>" news[10]="<a href='term.htm' target=_black><b><font color=#0099FF style='{text-decoration: none;cursor: crosshair}'><DIV STYLE='FONT-size:12 Pt'>Передвижение слов</DIV></font></b></a>" news[11]="<a href='useful.htm' target=_black><b><font color=#6600FF size=-1 style='{text-decoration: none; cursor: crosshair}'><DIV STYLE='FONT-size:12 pt'>Полезное для сайтов</DIV></font></b></a>" news[12]="<a href='frame.htm' target=_black><b><font color=#FFCC00 size=-1 style='{text-decoration: none; cursor: crosshair}'><DIV STYLE='FONT-size:12 pt'>Полезное для сайтов с фреймами</DIV></font></b></a>" news[13]="<a href='various.htm' target=_black><b><font color=#FF80C0 size=-1 style='{text-decoration: none; cursor: crosshair}'><DIV STYLE='FONT-size:12 pt'>Разные скрипты</DIV></font></b></a>" i=0 if (document.all) tickerobject=document.all.subtickertape.style else tickerobject=document.tickertape.document function regenerate(){ window.location.reload() } function regenerate2(){ if (document.layers) setTimeout("window.onresize=regenerate",450) } function update(){ BgFade(0xff,0xff,0xff, 0x00,0x00,0x00,10); if (document.layers){ document.tickertape.document.subtickertape. document.write('<span class="subtickertapefont" >'+news[i]+'</span>') document.tickertape.document.subtickertape. document.close() } else document.all.subtickertape. innerHTML=news[i] if (i<news.length-1) i++ else i=0 setTimeout("update()",speed) } function BgFade(red1, grn1, blu1, red2, grn2, blu2, steps) { sred = red1; sgrn = grn1; sblu = blu1; ered = red2; egrn = grn2; eblu = blu2; inc = steps; step = 0; RunFader(); } function RunFader() { var epct = step/inc; var spct = 1 - epct; if (document.layers) tickerobject.bgColor = Math.floor(sred * spct + ered * epct)*256*256 + Math.floor(sgrn * spct + egrn * epct)*256 + Math.floor(sblu * spct + eblu * epct); else tickerobject.greygroundColor= Math.floor(sred * spct + ered * epct)*256*256 + Math.floor(sgrn * spct + egrn * epct)*256 + Math.floor(sblu * spct + eblu * epct); if ( step < inc ) { setTimeout('RunFader()',50); } step++; } function start_news() { if (document.all||document.layers){ regenerate2();update()} } --> </script> </td></tr></tbody> </body> </html>
<endspoiler>
Ссылки показываются все на одном месте, меняются с красивым эффектом
<spoiler>
Посмотреть
<html> <head> <title>Ссылки показываются все на одном месте, меняются с красивым эффектом.</title> </head> <body onLoad="begin()" bgcolor=green> <script> <!-- function correct(){ if (finished){ setTimeout("begin()",3000) } return true } window.onerror=correct function begin(){ if (!document.all) return if (maxheight==null) maxheight=temp.offsetHeight whatsnew.style.height=maxheight temp.style.display="none" c=1 finished=true change() } //--> </script> <style> <!-- #whatsnew a{color:ffffff;text-decoration:none} #whatsnew, #temp {font-weight:bold; font-family:Arial} #whatsnew a:hover{color:red} --> </style> <script language="javascript1.2"> <!-- var head='' var top=0 var maxheight var finished=false var tickers=new Array() tickers[0]='<a href="https://scripts.mybb.ru">Красивый эффект.</a>' tickers[1]='<a href="https://scripts.mybb.ru">Это сообщение - ссылка.</a>' tickers[2]='<a href="https://scripts.mybb.ru">Меняет цвет при наведении мыши.</a>' tickers[3]='<a href="https://scripts.mybb.ru">Несложный короткий код.</a>' tickers[4]='<a href="https://scripts.mybb.ru">Один из множества скриптов с scripts.mybb.ru.</a>' for (i=1;i<=tickers.length-1;i++){ if (tickers[i].length>=tickers[top].length) top=i-1 } if (document.all) document.write('<span id="whatsnew" style="width:100%;height=10;filter:revealTrans(duration=2,transition=19)">'+tickers[0]+'</span>') function change(){ whatsnew.innerHTML='' whatsnew.filters.revealTrans.apply() whatsnew.filters.revealTrans.play() whatsnew.innerHTML=tickers[c] if (c==tickers.length-1) c=0 else c+=1 setTimeout("change()",5000) } if (document.all) document.write('<span id=ns style="display:none;">') //--> </script> </span> <span id=temp style="position:absolute;left:0;top:0" style=&{head};> <script> <!-- if (document.all){ temp.style.width=whatsnew.style.width document.write(tickers[top]) } //--> </script> </span><br> </center> </body> </html>
<endspoiler>
Прокручивающиеся ссылки
<spoiler>
Посмотреть
<html> <head> <style> A:hover {text-decoration:underline; color:#ffff00;font: Tahoma,Arial} A {text-decoration:none;} body{overflow-x:hidden;overflow-y:scroll;} </style> <title>Прокручивающиеся ссылки</title> <SCRIPT LANGUAGE="JavaScript"> <!-- // Your messages. Add as many as you like var message=new Array() message[0]="scripts.mybb.ru: CLICK HERE." message[1]="ИЩИ НУЖНЫЙ СКРИПТ ЗДЕСЬ." message[2]="Создай свой форум" // the URLs of your messages var messageurl=new Array() messageurl[0]="https://scripts.mybb.ru/" messageurl[1]="https://scripts.mybb.ru/" messageurl[2]="http://mybb.ru/" // the targets of the links // accepted values are '_blank' or '_top' or '_parent' or '_self' // or the name of your target-window (for instance 'main') var messagetarget=new Array() messagetarget[0]="_blank" messagetarget[1]="_blank" messagetarget[2]="_blank" // font-color var messagecolor= new Array() messagecolor[0]="red" messagecolor[1]="blue" messagecolor[2]="Yellow" // distance of the scroller to the left margin of the browser-window (pixels) var scrollerleft=20 // distance of the scroller to the top margin of the browser-window (pixels) var scrollertop=10 // width of the scroller (pixels) var scrollerwidth=300 // height of the scroller (pixels) var scrollerheight=20 // speed 1: lower means faster var pause=20 // speed 2: higher means faster var step=2 // font-size var fntsize=10 // font-family var fntfamily="Arial" // font-weight: 1 means bold, 0 means normal var fntweight=1 // do not edit the variables below var fadeimgwidth=60 var fadeimgleftcontent,fadeimgrightcontent var clipleft,clipright,cliptop,clipbottom var i_message=0 var timer var textwidth var textcontent="" if (fntweight==1) { fntweight="700" }else { fntweight="100" } function init() { gettextcontent() fadeimgleftcontent="<img src='http://superscripts.narod.ru/links/fadeimgleft.gif.gif' width="+fadeimgwidth+" height="+scrollerheight+">" fadeimgrightcontent="<img src='http://superscripts.narod.ru/links/fadeimgright.gif' width="+fadeimgwidth+" height="+scrollerheight+">" if (document.all) { text.innerHTML=textcontent fadeimgleft.innerHTML=fadeimgleftcontent fadeimgright.innerHTML=fadeimgrightcontent textwidth=text.offsetWidth document.all.text.style.posTop=scrollertop document.all.text.style.posLeft= scrollerleft+scrollerwidth document.all.fadeimgleft.style.posTop=scrollertop document.all.fadeimgleft.style.posLeft= scrollerleft document.all.fadeimgright.style.posTop= scrollertop document.all.fadeimgright.style.posLeft= scrollerleft+ scrollerwidth-fadeimgwidth clipleft=0 clipright=0 cliptop=0 clipbottom=scrollerheight document.all.text.style.clip="rect("+cliptop+" "+clipright+" "+clipbottom+" "+clipleft+")" scrolltext() } if (document.layers) { document.text.document.write(textcontent) document.text.document.close() document.fadeimgleft.document.write(fadeimgleftcontent) document.fadeimgleft.document.close() document.fadeimgright.document.write(fadeimgrightcontent) document.fadeimgright.document.close() textwidth=document.text.document.width document.text.top=scrollertop document.text.left=scrollerleft+scrollerwidth document.fadeimgleft.top=scrollertop document.fadeimgleft.left=scrollerleft document.fadeimgright.top=scrollertop document.fadeimgright.left=scrollerleft+ scrollerwidth-fadeimgwidth document.text.clip.left=0 document.text.clip.right=0 document.text.clip.top=0 document.text.clip.bottom=scrollerheight scrolltext() } } function scrolltext() { if (document.all) { if (document.all.text.style.posLeft>=scrollerleft-textwidth) { document.all.text.style.posLeft-=step clipright+=step if (clipright>scrollerwidth) { clipleft+=step } document.all.text.style.clip="rect("+cliptop+" "+clipright+" "+clipbottom+" "+clipleft+")" var timer=setTimeout("scrolltext()",pause) } else { changetext() } } if (document.layers) { if (document.text.left>=scrollerleft-textwidth) { document.text.left-=step document.text.clip.right+=step if (document.text.clip.right>scrollerwidth) { document.text.clip.left+=step } var timer=setTimeout("scrolltext()",pause) }else { changetext() }}} function changetext() { i_message++ if (i_message>message.length-1) { i_message=0 } gettextcontent() if (document.all) { text.innerHTML=textcontent textwidth=text.offsetWidth document.all.text.style.posLeft= scrollerleft+scrollerwidth clipleft=0 clipright=0 document.all.text.style.clip="rect("+cliptop+" "+clipright+" "+clipbottom+" "+clipleft+")" scrolltext() } if (document.layers) { document.text.document.write(textcontent) document.text.document.close() textwidth=document.text.document.width document.text.left=scrollerleft+scrollerwidth document.text.clip.left=0 document.text.clip.right=0 scrolltext() } } function gettextcontent() { textcontent="<span style='position: relative; font-size: "+fntsize+"pt; font-family: "+fntfamily+"; font-weight: "+fntweight+"'>" textcontent+="<a href="+messageurl[i_message]+" target="+messagetarget[i_message]+">" textcontent+="<nobr><font color="+messagecolor[i_message]+" >"+message[i_message]+"</font></nobr> </a></span>" } window.onresize=init; // - End of JavaScript - --> </SCRIPT> </HEAD> <body onLoad="init()"> <DIV ID="text" style="position:absolute;left:-2000px"></DIV> <DIV ID="fadeimgleft" style="position:absolute;left:-2000px"><img src="http://superscripts.narod.ru/links/fadeimgleft.gif"></DIV> <DIV ID="fadeimgright" style="position:absolute;left:-2000px"><img src="http://superscripts.narod.ru/links/fadeimgright.gif"></DIV> </body> </HTML>
<endspoiler>
Прокручивающиеся на разном фоне ссылки
<spoiler>
Посмотреть
<html> <head> <title>Прокручивающиеся на разном фоне ссылки</title> <SCRIPT LANGUAGE="JavaScript"> <!-- // Your messages. Add as many as you like var message=new Array() message[0]="scripts.mybb.ru" message[1]="фокусы javascript здесь кликай." message[2]="качай НУЖНОЕ кликай ЗДЕСЬ." // the URLs of your messages var messageurl=new Array() messageurl[0]="https://scripts.mybb.ru" messageurl[1]="https://scripts.mybb.ru" messageurl[2]="https://scripts.mybb.ru" // the targets of the links // accepted values are '_blank' or '_top' or '_parent' or '_self' // or the name of your target-window (for instance 'main') var messagetarget=new Array() messagetarget[0]="_blank" messagetarget[1]="_blank" messagetarget[2]="_blank" // the images that create the magic effect of the letters. // You can add an image for each message var messageimage=new Array() messageimage[0]="http://superscripts.narod.ru/links/bg77_1.jpg" messageimage[1]="http://superscripts.narod.ru/links/bg77_2.jpg" messageimage[2]="http://superscripts.narod.ru/links/bg77_3.jpg" // font-color of messages (required for Netscape Navigator) var messagecolor="blue" // distance of the scroller to the left margin of the browser-window (pixels) var scrollerleft=20 // distance of the scroller to the top margin of the browser-window (pixels) var scrollertop=20 // speed 1: lower means faster var pause=20 // speed 2: higher means faster var step=4 // font-size var fntsize=30 // font-family var fntfamily="Arial" // font-weight: 1 means bold, 0 means normal var fntweight=1 // do not edit the variables below var imgpreload=new Array() for (i=0;i<=messageimage.length-1;i++) { imgpreload[i]=new Image() imgpreload[i].src=messageimage[i] } var scrollerwidth=368 var scrollerheight=60 var backgroundimagecontent var clipleft,clipright,cliptop,clipbottom,clipleftbg, cliprightbg var i_message=0 var timer var textwidth var textcontent="" if (fntweight==1) {fntweight="700"} else {fntweight="100"} function init() { gettextcontent() if (document.all) { backgroundimagecontent="<img src='"+messageimage[0]+"' width='"+scrollerwidth+"'>" text.innerHTML=textcontent textwidth=text.offsetWidth backgroundimage.innerHTML=backgroundimagecontent document.all.text.style.height=scrollerheight document.all.text.style.posTop=scrollertop document.all.text.style.filter="chroma(color="+messagecolor+")" document.all.text.style.posLeft=scrollerleft+ scrollerwidth document.all.backgroundimage.style.posTop= scrollertop document.all.backgroundimage.style.posLeft= scrollerleft clipleft=0 clipright=0 cliptop=0 clipbottom=scrollerheight clipleftbg=scrollerwidth cliprightbg=scrollerwidth document.all.text.style.clip="rect("+cliptop+" "+clipright+" "+clipbottom+" "+clipleft+")" document.all.backgroundimage.style.clip="rect("+cliptop+" "+cliprightbg+" "+clipbottom+" "+clipleftbg+")" scrolltext() } if (document.layers) { document.textnetscape.document.write(textcontent) document.textnetscape.document.close() textwidth=document.textnetscape.document.width document.textnetscape.top=scrollertop document.textnetscape.left=scrollerleft+ scrollerwidth document.textnetscape.clip.left=0 document.textnetscape.clip.right=0 document.textnetscape.clip.top=0 document.textnetscape.clip.bottom=scrollerheight scrolltext() } } function scrolltext() { if (document.all) { if (document.all.text.style.posLeft>=scrollerleft-textwidth) { document.all.text.style.posLeft-=step clipright+=step clipleftbg-=step if (clipright>scrollerwidth) { clipleft+=step } if (document.all.text.style.posLeft<scrollerleft- textwidth+ scrollerwidth) { cliprightbg-=step } document.all.text.style.clip ="rect("+cliptop+" "+clipright+" "+clipbottom+" "+clipleft+")" document.all.backgroundimage.style.clip="rect("+cliptop+" "+cliprightbg+" "+clipbottom+" "+clipleftbg+")" var timer=setTimeout("scrolltext()",pause) } else { changetext() } } if (document.layers) { if (document.textnetscape.left>=scrollerleft-textwidth) { document.textnetscape.left-=step document.textnetscape.clip.right+=step if (document.textnetscape.clip.right>scrollerwidth) { document.textnetscape.clip.left+=step } var timer=setTimeout("scrolltext()",pause) } else { changetext() } } } function changetext() { i_message++ if (i_message>message.length-1) {i_message=0} gettextcontent() if (document.all) { text.innerHTML=textcontent textwidth=text.offsetWidth backgroundimagecontent="<img src='"+messageimage[i_message]+"' width='"+scrollerwidth+"'>" backgroundimage.innerHTML=backgroundimagecontent document.all.text.style.posLeft=scrollerleft+ scrollerwidth clipleft=0 clipright=0 clipleftbg=scrollerwidth cliprightbg=scrollerwidth document.all.text.style.clip="rect("+cliptop+" "+clipright+" "+clipbottom+" "+clipleft+")" document.all.backgroundimage.style.clip="rect("+cliptop+" "+cliprightbg+" "+clipbottom+" "+clipleftbg+")" scrolltext() } if (document.layers) { document.textnetscape.document.write(textcontent) document.textnetscape.document.close() textwidth=document.textnetscape.document.width document.textnetscape.left=scrollerleft+ scrollerwidth document.textnetscape.clip.left=0 document.textnetscape.clip.right=0 scrolltext() } } function gettextcontent() { textcontent="<span style='position: relative; font-size: "+fntsize+"pt; font-family: "+fntfamily+"; font-weight: "+fntweight+"'>" textcontent+="<a href="+messageurl[i_message]+" target="+messagetarget[i_message]+">" textcontent+="<nobr><font color="+messagecolor+" >"+message[i_message]+"</font></nobr></a></span>" } window.onresize=init; // - End of JavaScript - --> </SCRIPT> </HEAD> <body onLoad="init()"> <DIV ID="backgroundimage" style="position:absolute; left:-2000px;"></DIV> <DIV ID="text" style="position: absolute; left:-2000px; background-color: Black; filter: chroma(color=black;);"></DIV> <DIV ID="textnetscape" style="position:absolute; left:-2000px;"></DIV> </BODY> </HTML>
<endspoiler>
Ссылки прокручиваются на фоне сменяющихся картинок (банер)
<spoiler>
Посмотреть
<html> <head> <title>Ссылки прокручиваются на фоне сменяющихся картинок</title> <SCRIPT type="text/javascript" language="JavaScript"> // messages. Add as many messages as you like var message=new Array() message[0]="С новым годом!" message[1]="У нас действуют скидки!" message[2]="Подарки заказавшим сайт!" // links of the messages (you need to set up link for each message) var messageurl=new Array() messageurl[0]="https://scripts.mybb.ru" messageurl[1]="https://scripts.mybb.ru" messageurl[2]="https://scripts.mybb.ru" // targets of the links (you need to set up a target for each message) // accepted values are '_blank' or '_top' or '_parent' or '_self' // or the name of your target-window (for instance 'main') var messagetarget=new Array() messagetarget [0]="_blank" messagetarget [1]="_blank" messagetarget [2]="_blank" var textshadowcolor="blue" var pause=20 var step=5 var fntsize=14 var fntfamily="Impact" var fntweight=0 var textcolor="#000000" var backgroundcolor="#ffffff" var borderwidth=0 var topdistance=220 // DO NOT EDIT ANYTHING BELOW THIS LINE!!!! var snowani=new Array("http://superscripts.narod.ru/links/snowani0.gif", "http://superscripts.narod.ru/links/snowani1.gif", "http://superscripts.narod.ru/links/snowani2.gif") var snowani0=new Image() snowani0.src="http://superscripts.narod.ru/links/snowani0.gif" var snowani1=new Image() snowani1.src="http://superscripts.narod.ru/links/snowani1.gif" var snowani2=new Image() snowani2.src="http://superscripts.narod.ru/links/snowani2.gif" var cellpad=10 var scrollerwidth=220 var scrollerheight=30 var shadowsize=1 var scrollerleft var scrollertop var screenwidth var clipleft,clipright,cliptop,clipbottom var i_message=0 var i_snowani=0 var timer var textwidth var textcontent="" var textshadowcontent="" var bgcontent="" if (fntweight==1) {fntweight="bold"} else {fntweight="normald"} topdistance=topdistance+cellpad function doanimation() { if (i_snowani>=3) {i_snowani=0} if (document.all) { bgcontent="<img src='"+snowani[i_snowani]+"'>" bgscroller.innerHTML=bgcontent } if (document.layers) { document.bgscroller.document.snowpic.src=snowani[i_snowani] } i_snowani++ var animation_timer=setTimeout("doanimation()",200) } function init() { doanimation() gettextcontent() if (document.all) {gettextshadowcontent()} if (document.all) { screenwidth=document.body.clientWidth scrollertop=document.body.scrollTop scrollerleft=screenwidth/2-scrollerwidth/2 text.innerHTML=textcontent textshadow.innerHTML=textshadowcontent textwidth=text.offsetWidth document.all.bgscroller.style.posTop =scrollertop-cellpad+topdistance document.all.bgscroller.style.posLeft =scrollerleft-cellpad document.all.text.style.posTop =scrollertop+topdistance document.all.text.style.posLeft =scrollerleft+scrollerwidth document.all.textshadow.style.posTop =scrollertop+shadowsize+topdistance document.all.textshadow.style.posLeft =scrollerleft+scrollerwidth+shadowsize clipleft=0 clipright=0 cliptop=0 clipbottom=scrollerheight document.all.text.style.clip ="rect("+cliptop+" "+clipright+" "+clipbottom+" "+clipleft+")" document.all.textshadow.style.clip ="rect("+cliptop+" "+clipright+" "+clipbottom+" "+clipleft+")" scrolltext() } if (document.layers) { screenwidth=window.innerWidth scrollertop=pageYOffset scrollerleft=screenwidth/2-scrollerwidth/2 document.text.document.write(textcontent) document.text.document.close() textwidth=document.text.document.width document.bgscroller.top=scrollertop-cellpad+topdistance document.bgscroller.left=scrollerleft-cellpad document.text.top=scrollertop+topdistance document.text.left=scrollerleft+scrollerwidth document.text.clip.left=0 document.text.clip.right=0 document.text.clip.top=0 document.text.clip.bottom=scrollerheight scrolltext() } } function scrolltext() { if (document.all) { if (document.all.text.style.posLeft>=scrollerleft-textwidth) { document.all.text.style.posLeft-=step document.all.textshadow.style.posLeft =document.all.text.style.posLeft+shadowsize clipright+=step if (clipright>scrollerwidth) { clipleft+=step } scrollertop=document.body.scrollTop document.all.text.style.clip ="rect("+cliptop+" "+clipright+" "+clipbottom+" "+clipleft+")" document.all.textshadow.style.clip ="rect("+cliptop+" "+clipright+" "+clipbottom+" "+clipleft+")" document.all.bgscroller.style.posTop =scrollertop-cellpad+topdistance document.all.text.style.posTop =scrollertop+topdistance document.all.textshadow.style.posTop =scrollertop+shadowsize+topdistance var timer=setTimeout("scrolltext()",pause) } else { changetext() } } if (document.layers) { if (document.text.left>=scrollerleft-textwidth) { document.text.left-=step document.text.clip.right+=step if (document.text.clip.right>scrollerwidth) { document.text.clip.left+=step } scrollertop=pageYOffset document.bgscroller.top=scrollertop-cellpad+topdistance document.text.top=scrollertop+topdistance var timer=setTimeout("scrolltext()",pause) } else { changetext() } } } function changetext() { i_message++ if (i_message>message.length-1) {i_message=0} gettextcontent() if (document.all) {gettextshadowcontent()} if (document.all) { text.innerHTML=textcontent textshadow.innerHTML=textshadowcontent textwidth=text.offsetWidth document.all.text.style.posLeft= scrollerleft+scrollerwidth document.all.textshadow.style.posLeft= scrollerleft+scrollerwidth+shadowsize clipleft=0 clipright=0 document.all.text.style.clip ="rect("+cliptop+" "+clipright+" "+clipbottom+" "+clipleft+")" document.all.textshadow.style.clip ="rect("+cliptop+" "+clipright+" "+clipbottom+" "+clipleft+")" scrolltext() } if (document.layers) { document.text.document.write(textcontent) document.text.document.close() textwidth=document.text.document.width document.text.left=scrollerleft+scrollerwidth document.text.clip.left=0 document.text.clip.right=0 scrolltext() } } function gettextcontent() { textcontent="<span style='position:relative;font-size:"+fntsize+"pt; font-family:"+fntfamily+";font-weight:"+fntweight+";'>" textcontent+="<a href="+messageurl[i_message]+" target="+messagetarget[i_message]+">" textcontent+="<nobr> <font color="+textcolor+"> "+message[i_message]+"</font></nobr></a></span>" } function gettextshadowcontent() { textshadowcontent="<span style='position:relative;font-size:"+fntsize+"pt; font-family:"+fntfamily+";font-weight:"+fntweight+"'>" textshadowcontent+="<a href="+messageurl[i_message]+" target="+messagetarget[i_message]+">" textshadowcontent+="<nobr><font color="+textshadowcolor+">"+message[i_message]+"</font> </nobr></a></span>" } window.onresize=init; window.onload=init;</script> </head> <body> <DIV ID="bgscroller" style="position:absolute;"> <img name="snowpic" src="http://superscripts.narod.ru/links/snowani0.gif"></DIV> <DIV ID="textshadow" style="position:absolute;">Текст</DIV> <DIV ID="text" style="position:absolute;"> <img name="snowpic" src="http://superscripts.narod.ru/links/snowani2.gif"></DIV> </body> </html>
<endspoiler>
Смена ссылок на одном месте с красивым цветовым эффектом
<spoiler>
Посмотреть
<html> <head> <title>Скрипт смены ссылок на одном месте с красивым цветовым эффектом.</title> <style><!-- #tickertape{ position:relative; layer-background-color:green; width:400; height:32;} #subtickertape{ background-color:green; position:relative; border: 1px solid black;width:400; height:32;} .subtickertapefont{ font:bold 32px Verdana; text-decoration:none; color:white;} .subtickertapefont a{color:white; text-decoration:none;} --></style> </head> <body onload="if (document.all||document.layers) {regenerate2();update()}"> <div align="center"> <div id="tickertape"> <div id="subtickertape" class="subtickertapefont">Initializing...</div> </div> <script language="JavaScript1.2"> //default speed is 4.5 seconds, Change that as desired var speed=4500 var news=new Array() news[0]="<a href='https://scripts.mybb.ru'>Scripts.mybb.ru</a>" news[1]="<a href='https://scripts.mybb.ru'>Это ссылка</a>" news[2]="<a href='https://scripts.mybb.ru'>Welcome ...</a>" //expand or shorten this list of messages as desired i=0 if (document.all) tickerobject=document.all.subtickertape.style else tickerobject=document.tickertape.document function regenerate(){ window.location.reload() } function regenerate2(){ if (document.layers) setTimeout("window.onresize=regenerate",450) } function update(){ BgFade(0xff,0xff,0xff, 0x00,0x00,0x00,10); if (document.layers){ document.tickertape.document.subtickertape. document.write('<span class="subtickertapefont">'+news[i]+'</span>') document.tickertape.document.subtickertape. document.close() } else document.all.subtickertape.innerHTML=news[i] if (i<news.length-1) i++ else i=0 setTimeout("update()",speed) } function BgFade(red1, grn1, blu1, red2, grn2, blu2, steps) { sred = red1; sgrn = grn1; sblu = blu1; ered = red2; egrn = grn2; eblu = blu2; inc = steps; step = 0; RunFader(); } function RunFader() { var epct = step/inc; var spct = 1 - epct; if (document.layers) tickerobject.bgColor = Math.floor(sred * spct + ered * epct)*256*256 + Math.floor(sgrn * spct + egrn * epct)*256 + Math.floor(sblu * spct + eblu * epct); else tickerobject.backgroundColor= Math.floor(sred * spct + ered * epct)*256*256 + Math.floor(sgrn * spct + egrn * epct)*256 + Math.floor(sblu * spct + eblu * epct); if ( step < inc ) { setTimeout('RunFader()',50); } step++; } </script></div> </body> </html>
<endspoiler>
Табличка с сылками собирается из кусочков вылетающих с разных сторон, вылетает несколько ссылок по очереди
<spoiler>
Посмотреть
<html> <head> <title>Табличка с сылками собирается из кусочков вылетающих с разных сторон, вылетает несколько ссылок по очереди.</title> </head> <body onLoad="initiate()"> <script> <!-- // Edit your messages. You can add as many messages a you like. var message = new Array() message[0]="Добро пожаловать! На форум Scripts.mybb.ru" message[1]="Есть еще сайт mybb.ru" message[2]="Можете и перейти прямо отсюда туда" message[3]="здесь разные ссылки у сообщений" message[4]=" и красивый эфект при наведении" // The links of your messages. Be sure that you configure as many links as messages. // If don't want to link your messages write '#' instead of an URL (see last sample). var messageurl = new Array() messageurl[0]="https://scripts.mybb.ru" messageurl[1]="http://mybb.ru" messageurl[2]="https://scripts.mybb.ru" messageurl[3]="https://scripts.mybb.ru" messageurl[4]="https://scripts.mybb.ru" // The width of your textbox (pixels). // Be sure that 'textwidth' is slightly bigger than the 'width' configured inside the stylesheet var textwidth=260 // The height of your textbox (pixels) // Be sure that 'textheight' is slightly bigger than the 'height' configured inside the stylesheet var textheight=75 // Final horizontal position of the textbox: distance to the left margin of the window (pixels) // IMPORTANT: // if you want to center the textbox in the middle of the browser-window then write -1. // If you want to place the textbox on an absolute position // then write the number (for instance 223). var x_finalpos=-1 // Final vertical position of the textbox: distance to the top margin of the window var y_finalpos=20 // Total number of textslices var textslices=10 // Standstill of textbox (seconds) var pausetext=2 // Speed of horizontal gliding var step=40 var pause=10 // Do not edit the variables below this line var x_rightspans=0 var x_leftspans=0 var marginright var marginleft var height_slice=Math.floor(textheight/textslices) var cliptop=0 var clipbottom=cliptop+height_slice var clipleft=0 var clipright=textwidth var spannummer=0 var spannrbefore=0 var i_message=0 pausetext=pausetext*1000 function initiate() { if (document.all) { if (x_finalpos==-1) { x_finalpos=Math.floor(document.body.clientWidth/2)-Math.floor(textwidth/2) } changemessage() } } function changemessage() { for (i=0;i<=textslices-1;i++) { var thisspan=eval("span"+i) thisspan.innerHTML="<a href='"+messageurl[i_message]+"' target='blank' >"+message[i_message]+"</a>" } gostartposition() } function gostartposition() { for (i=0;i<=textslices-1;i+=2) { var thisspan=eval("document.all.span"+i+".style") thisspan.posLeft=marginright } for (i=1;i<=textslices-1;i+=2) { var thisspan=eval("document.all.span"+i+".style") thisspan.posLeft=marginleft } moveslices_IE() } function moveslices_IE() { if (x_rightspans==0 || x_leftspans==0) { if (x_rightspans==0) { for (i=0;i<=textslices-1;i+=2) { var thisspan=eval("document.all.span"+i+".style") thisspan.posLeft-=step } if (thisspan.posLeft<=x_finalpos) { x_rightspans=1 for (i=0;i<=textslices-1;i+=2) { var thisspan=eval("document.all.span"+i+".style") thisspan.posLeft=x_finalpos } } } if (x_leftspans==0) { for (i=1;i<=textslices-1;i+=2) { var thisspan=eval("document.all.span"+i+".style") thisspan.posLeft+=step } if (thisspan.posLeft>=x_finalpos) { x_leftspans=1 for (i=1;i<=textslices-1;i+=2) { var thisspan=eval("document.all.span"+i+".style") thisspan.posLeft=x_finalpos } } } var timer=setTimeout("moveslices_IE()",pause) } else { clearTimeout(timer) x_rightspans=0 x_leftspans=0 i_message++ if (i_message > message.length-1) { i_message=0 } var timer=setTimeout("changemessage()",pausetext) } } // --> </script> <style> A { text-decoration : none} A:hover { color : Yellow; text-decoration : none} .textbox { font-size : 18; font-family : Verdana; font-style : normal; color : Yellow; border-width : 4; text-align : center; background-color : #006600; border-style : solid; padding : 5; height : 65; width : 250; overflow : clip; font-weight : bold;} </style> <script> <!-- // Do not edit this script-block if (document.all) { for (i=0;i<=textslices-1;i+=2) { marginright=document.body.clientWidth+50 document.write("<span class='textbox' id='span"+i+"' style='position:absolute; visibility:visible; left:"+marginright+"px; top:"+y_finalpos+"px; clip: rect("+cliptop+"px "+clipright+"px "+clipbottom+"px "+clipleft+"px)'>") document.write("</span>") cliptop+=2*height_slice clipbottom+=2*height_slice } cliptop=height_slice clipbottom=2*height_slice for (i=1;i<=textslices-1;i+=2) { marginleft=-textwidth-50 document.write("<span class='textbox' id='span"+i+"' style='position: absolute; visibility: visible; left: "+marginleft+"px; top:"+y_finalpos+"px; clip: rect("+cliptop+"px "+clipright+"px "+clipbottom+"px "+clipleft+"px)'>") document.write("</span>") cliptop+=2*height_slice clipbottom+=2*height_slice } } // --> </script> <DIV style="position:absolute; top:200px; left:5px;"></DIV> </body> </html>
<endspoiler>