|
↑
Scrolls >>>
Scrolling words along the bottom of the page is cool and all, but this one takes the cake.... You can scroll text, links, images, buttons, basically anything you want, in a little news like box on your site. And, you can have as many messages as you want.
|
This news scroller begins
Displaying text and images
From the bottom of the box
And restarts when all the
Information scrolls above
The top of the box.
Any HTML page content can
Be used in this Javascript
Scroller.
yourmail@hotmail.com
|
|
Add the below code to the <body> section of your page:
<script
language="javascript"
type="text/javascript">
var
blank =
"blank.gif";
topedge
=
350;
leftedge
=
300;
boxheight
=
150;
boxwidth
=
510;
scrollheight
=
240;
function
scrollnews(cliptop)
{
newsDiv
=
document.getElementById('news').style;
newsDiv.clip
=
"rect("
+
cliptop +
"px "
+
(boxwidth
+
leftedge)
+
"px "
+
(cliptop
+
boxheight)
+
"px 0px)";
newsDiv.pixelLeft
=
leftedge;
newsDiv.pixelTop
=
topedge -
cliptop;
cliptop
=
(cliptop
+
1)
%
(scrollheight
+
boxheight);
newsDiv.visibility='visible';
setTimeout("scrollnews("
+
cliptop +
")",
50);
}
</script>
<div
ID="news"
style="position:absolute;
visibility:hidden;
top:150; left:300; height:600;
clip:rect(10,100,100,10); border-width:0px;">
<table
border=0
cellpadding=1
cellspacing=0
bgcolor="white">
<tr>
<td>
<script
language="javascript">
document.write('<img
src='
+
blank +
' width=1 height='+boxheight+'>');
</script>
</td>
</tr>
<tr>
<td>
This news scroller begins<br>
Displaying text and images<br>
From the bottom of the box<br>
And restarts when all the<br>
Information scrolls above<br>
The top of the box.<br><br>
Any HTML page content can<br>
Be used in this Javascript<br>
Scroller.<br>
<br>
<a
href="mailto:yourmail@hotmail.com">yourmail@hotmail.com</a>
</td>
</tr>
<tr>
<td>
<script
language="javascript">
document.write('<img
src='
+
blank +
' width=1 height='+boxheight+'>');
function
Go()
{
scrollnews(0);
}
window.onload
=
Go;
</script>
</td>
</tr>
</table>
</div>
|
→ NCEdCloud - My.NcedCloud.org IAM Service - NCEDCloud Login
|