1
0
mirror of https://github.com/rkd77/elinks.git synced 2024-11-04 08:17:17 -05:00
elinks/test/ecmascript/scroll.html
2007-04-26 22:37:09 +02:00

30 lines
602 B
HTML

<body>
<!-- test setTimeout and clearTimeout -->
<script>
var tekst1 = ' ELinks';
var tekst2 = ' ELinks';
var h;
function scrollText(tekst) {
var znak = tekst.charAt(0);
tekst = tekst.substring(1, tekst.length) + znak;
return tekst.substring(0, 40);
}
function scroll() {
tekst1 = scrollText(tekst1);
document.title = tekst1 + tekst2;
setTimeout("scroll()", 100);
}
function scroll2() {
tekst2 = scrollText(tekst2);;
h = setTimeout("scroll2()", 200);
}
function killer() {
setTimeout("clearTimeout(h)", 10000);
}
scroll();
scroll2();
killer();
</script>
</body>