Kod:
<marquee id="alertit" style="position:absolute;left:0px;top:0;background-color:#FFFFE6" onMouseover="this.scrollAmount=1" onMouseout="this.scrollAmount=speed"></marquee>
<script type="text/javascript">
/*
Alert-It Scroller script- By JavaScript Kit
For this and over 400+ free scripts, visit http://www.javascriptkit.com
This notice must stay intact
*/
//Customize your message here. Use any HTML desired:
var themsg=''<span style="font:italic 22px Arial;color:red;"><b>Breaking News: Microsoft Stock up 10 points! Source: <a href="http://cnn.com" target="_new">CNN</a></b></span>''
var speed=6 //speed of scroller (1-10 or more)
var loops=2 //specify number of times message scrolls across screen (an integer or "infinite")
function populatescroller(){
var windowwidth=iecompattest().clientWidth
********.getElementById("alertit").innerHTML=themsg
********.getElementById("alertit").style.width=windowwidth
********.getElementById("alertit").scrollAmount=speed
********.getElementById("alertit").scrollDelay=20
********.getElementById("alertit").loop=loops
********.getElementById("alertit").onfinish=function(){
********.getElementById("alertit").style.visibility="hidden"
}
}
function iecompattest(){
return (********.compatMode!="BackCompat")? ********.********Element : ********.body
}
if (********.all && ********.getElementById){
window.onload=populatescroller
window.onresize=populatescroller
}
</script>
<p align="left"><font face="arial" size="-2">This free script provided by<br>
<a href="http://javascriptkit.com">JavaScript Kit</a></font></p>