1
0
mirror of https://github.com/rkd77/elinks.git synced 2024-09-28 03:06:20 -04:00

test: scroll.html tests setTimeout and clearTimeout.

This commit is contained in:
Witold Filipczyk 2007-04-26 22:37:09 +02:00 committed by Witold Filipczyk
parent 6d4828440e
commit 71c13ecbdb

View File

@ -1,14 +1,29 @@
<body onload="scroll()">
<body>
<!-- test setTimeout and clearTimeout -->
<script>
var tekst = ' ELinks';
function scrollText() {
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, 80);
return tekst.substring(0, 40);
}
function scroll () {
document.title = scrollText();
setTimeout("scroll()", 100);
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>