»
AnglaisFrançaisVietnamien

Imprimer - OneLineScroller - JavaScriptBank.com

Version complète: jsB@nk » Scrollers » Défilement vertical » OneLineScroller
URL: https://www.javascriptbank.com/onelinescroller.html

OneLineScroller © JavaScriptBank.comOneLineScroller défile votre messages de bas en haut une pause entre chaque message. Chaque message se compose d'un corréler titre et un court texte copie. Configurer tous les éléments sans la connaissance de la programmation à la tête du script: font-family, font-size, font-color, background-color, scrollerwidth, scrollerheight, faire une pause entre les messages et ainsi de suite.

Version complète: jsB@nk » Scrollers » Défilement vertical » OneLineScroller
URL: https://www.javascriptbank.com/onelinescroller.html



CSS
<STYLE>A {COLOR: #aa0000}A:hover {COLOR: #ff0000}</STYLE><!--    This script downloaded from www.JavaScriptBank.com    Come to view and download over 2000+ free javascript at www.JavaScriptBank.com-->


JavaScript
<SCRIPT language=JavaScript1.2>// Simple OneLineScrollervar message= new Array()// Configure each message below like this:// message[indexnumber]="text of title|text of copy|URL of link"// You may add as many messages as you like.message[0]="INTERNET GAMES|The latest games, discussions, tricks and cheats from about.com |http://service.bfast.com/bfast/click?bfmid=7279965&siteid=30125004&bfpage=internetgames3"message[1]="WEB CLIP ART|Collections, creation tricks, tutorials and free tools from about.com|http://service.bfast.com/bfast/click?bfmid=7279965&siteid=30125004&bfpage=webclipart3"message[2]="HAPPY CHATTING|Link to an expert from about.com |http://service.bfast.com/bfast/click?bfmid=7279965&siteid=30125004&bfpage=chatting"// height of the scrollerbox (pixels)var scrollerheight=20// width of the titlezone (pixels)var titlezonewidth=120// width of the copyzone (pixels)var copyzonewidth=440// horizonal position: distance to the top border of the window (pixels)var scrollertop=20// vertical position: distance to the left border of the window (pixels)var scrollerleft=20// borderwidth of the scrollervar scrollerborder=2// backgroundcolor for the titlezonevar titlezonebg="330066"// backgroundcolor for the copyzonevar copyzonebg="CC0000"// backgroundcolor for the scrollervar scrollbg="AAAAAA"// The target of your links// possible values are '_blank', '_self', '_top', '_parent' or the name of// the target window for instance 'main'var targetlink="_blank"// font attributes of the titlevar font_titleface="Verdana"var font_titlecolor="FFFFFF"var font_titlesize=1// font attributes of the copytextvar font_copyface="Verdana"var font_copycolor="FFFFFF"var font_copysize=1// set 1 for bold title, set 0 for normal titlevar titlebold=1// set 1 for bold copy, set 0 for normal copyvar copybold=1// set 'right', 'left' or 'center' to align the titlevar titlealign="right"// set 'right', 'left' or 'center' to align the copyvar copyalign="left"// standstill between the messages (milliseconds)var standstill=4000// Do not edit below this linevar pre_titleboldvar after_titleboldvar pre_copyboldvar after_copyboldvar cliptop=0var clipbottom=0var clipleft=0var clipright=titlezonewidth+copyzonewidthvar i_message=0var mes_joinedvar mes_splitvar contenttextvar contentbg=""var step=1var pause=20if (titlebold==1) {pre_titlebold="<b>"after_titlebold="</b>"}else if (titlebold==0) {pre_titlebold=""after_titlebold=""}if (copybold==1) {pre_copybold="<b>"after_copybold="</b>"}else if (copybold==0) {pre_copybold=""after_copybold=""}function initiate() {mes_joined=message[i_message]mes_split=mes_joined.split("|")contenttext="<table cellpadding=4 cellspacing=0 border=0>"contenttext+="<tr valign='top'>"contenttext+="<td align="+titlealign+" width="+titlezonewidth+" height='"+scrollerheight+"' bgcolor='"+titlezonebg+"'>"contenttext+="<a href='"+mes_split[2]+"' target='"+targetlink+"'>"contenttext+="<font face='"+font_titleface+"' color='"+font_titlecolor+"' size='"+font_titlesize+"'>"contenttext+=pre_titleboldcontenttext+=mes_split[0]contenttext+=after_titleboldcontenttext+="</font></a></td>"contenttext+="<td align="+copyalign+" width="+copyzonewidth+" height='"+scrollerheight+"' bgcolor='"+copyzonebg+"'>"contenttext+="<font face='"+font_copyface+"' color='"+font_copycolor+"' size='"+font_copysize+"'>"contenttext+=pre_copyboldcontenttext+=mes_split[1]contenttext+=after_copyboldcontenttext+="</font></td></tr>"contenttext+="</table>"var bg_width=titlezonewidth+copyzonewidth+2*scrollerbordervar bg_height=scrollerheight+2*scrollerbordercontentbg="<table width="+bg_width+" height='"+bg_height+"' cellpadding=0 cellspacing=0 border='"+scrollerborder+"'><tr><td bgcolor='"+scrollbg+"'>&nbsp;</td></tr></table>"if (document.all) {scrollertext.innerHTML=contenttextscrollerbg.innerHTML=contentbgdocument.all.scrollertext.style.posTop=scrollertop+scrollerheightdocument.all.scrollertext.style.posLeft=scrollerleftdocument.all.scrollerbg.style.posTop=scrollertop-scrollerborderdocument.all.scrollerbg.style.posLeft=scrollerleft-scrollerborderdocument.all.scrollertext.style.clip="rect("+cliptop+" "+clipright+" "+clipbottom+" "+clipleft+")"scrollin()}if (document.layers) {document.scrollertext.document.write(contenttext)document.scrollertext.document.close()document.scrollerbg.document.write(contentbg)document.scrollerbg.document.close()document.scrollertext.top=scrollertop+scrollerheightdocument.scrollertext.left=scrollerleftdocument.scrollerbg.top=scrollertop-scrollerborderdocument.scrollerbg.left=scrollerleft-scrollerborderdocument.scrollertext.clip.left=clipleft        document.scrollertext.clip.right=clipright        document.scrollertext.clip.top=cliptop        document.scrollertext.clip.bottom=clipbottomscrollin()}}function scrollin(){if (document.all){if (document.all.scrollertext.style.posTop>scrollertop) {clipbottom+=stepdocument.all.scrollertext.style.clip="rect("+cliptop+" "+clipright+" "+clipbottom+" "+clipleft+")"document.all.scrollertext.style.posTop-=stepvar timer=setTimeout("scrollin()",pause)}else {clearTimeout(timer)var timer=setTimeout("scrollout()",standstill)}}if (document.layers){if (document.scrollertext.top>scrollertop) {clipbottom+=stepdocument.scrollertext.clip.left=clipleft        document.scrollertext.clip.right=clipright        document.scrollertext.clip.top=cliptop        document.scrollertext.clip.bottom=clipbottomdocument.scrollertext.top-=stepvar timer=setTimeout("scrollin()",pause)}else {clearTimeout(timer)var timer=setTimeout("scrollout()",standstill)}}}function scrollout(){if (document.all){if (document.all.scrollertext.style.posTop>(scrollertop-scrollerheight)) {cliptop+=stepdocument.all.scrollertext.style.clip="rect("+cliptop+" "+clipright+" "+clipbottom+" "+clipleft+")"document.all.scrollertext.style.posTop-=stepvar timer=setTimeout("scrollout()",pause)}else {clearTimeout(timer)changemessage()}}if (document.layers){if (document.scrollertext.top>(scrollertop-scrollerheight)) {cliptop+=stepdocument.scrollertext.clip.left=clipleft        document.scrollertext.clip.right=clipright        document.scrollertext.clip.top=cliptop        document.scrollertext.clip.bottom=clipbottomdocument.scrollertext.top-=stepvar timer=setTimeout("scrollout()",pause)}else {clearTimeout(timer)changemessage()}}}function changemessage(){i_message++if (i_message>message.length-1) {i_message=0}mes_joined=message[i_message]mes_split=mes_joined.split("|")cliptop=0clipbottom=0contenttext="<table cellpadding=4 cellspacing=0 border=0>"contenttext+="<tr valign='top'>"contenttext+="<td align="+titlealign+" width="+titlezonewidth+" height='"+scrollerheight+"' bgcolor='"+titlezonebg+"'>"contenttext+="<a href='"+mes_split[2]+"' target='"+targetlink+"'>"contenttext+="<font face='"+font_titleface+"' color='"+font_titlecolor+"' size='"+font_titlesize+"'>"contenttext+=pre_titleboldcontenttext+=mes_split[0]contenttext+=after_titleboldcontenttext+="</font></a></td>"contenttext+="<td align="+copyalign+" width="+copyzonewidth+" height='"+scrollerheight+"' bgcolor='"+copyzonebg+"'>"contenttext+="<font face='"+font_copyface+"' color='"+font_copycolor+"' size='"+font_copysize+"'>"contenttext+=pre_copyboldcontenttext+=mes_split[1]contenttext+=after_copyboldcontenttext+="</font></td></tr>"contenttext+="</table>"if (document.all) {scrollertext.innerHTML=contenttextdocument.all.scrollertext.style.posTop=scrollertop+scrollerheightdocument.all.scrollertext.style.posLeft=scrollerleftdocument.all.scrollertext.style.clip="rect("+cliptop+" "+clipright+" "+clipbottom+" "+clipleft+")"scrollin()}if (document.layers) {document.scrollertext.document.write(contenttext)document.scrollertext.document.close()document.scrollertext.top=scrollertop+scrollerheightdocument.scrollertext.left=scrollerleftdocument.scrollertext.clip.left=clipleft        document.scrollertext.clip.right=clipright        document.scrollertext.clip.top=cliptop        document.scrollertext.clip.bottom=clipbottomscrollin()}}</SCRIPT><!--    This script downloaded from www.JavaScriptBank.com    Come to view and download over 2000+ free javascript at www.JavaScriptBank.com-->


HTML
<BODY onload=initiate()><DIV id=scrollerbg style="POSITION: absolute; TOP: -1000px"></DIV><DIV id=scrollertext style="POSITION: absolute; TOP: -1000px"></DIV></BODY><!--    This script downloaded from www.JavaScriptBank.com    Come to view and download over 2000+ free javascript at www.JavaScriptBank.com-->