mirror of
https://github.com/rkd77/elinks.git
synced 2024-12-04 14:46:47 -05:00
[test] test for 2 setTimeout at the same time
This commit is contained in:
parent
813e2e595f
commit
6a7d8ba7bc
36
test/ecmascript/scroll4.html
Normal file
36
test/ecmascript/scroll4.html
Normal file
@ -0,0 +1,36 @@
|
||||
<html>
|
||||
<head>
|
||||
<script>
|
||||
var tekstA = ' ELinks';
|
||||
function scrollTextA() {
|
||||
var znak = tekstA.charAt(0);
|
||||
tekstA = tekstA.substring(1, tekstA.length) + znak;
|
||||
return '<pre>' + tekstA.substring(0, 80) + '</pre>';
|
||||
}
|
||||
function scrollA() {
|
||||
document.getElementById('s').innerHTML = scrollTextA();
|
||||
window.setTimeout(scrollA, 100);
|
||||
}
|
||||
var tekst = ' ELinks';
|
||||
function scrollText() {
|
||||
var znak = tekst.charAt(0);
|
||||
tekst = tekst.substring(1, tekst.length) + znak;
|
||||
return '<pre>' + tekst.substring(0, 80) + '</pre>';
|
||||
}
|
||||
function scroll() {
|
||||
document.getElementById('s2').innerHTML = scrollText();
|
||||
window.setTimeout(scroll, 150);
|
||||
}
|
||||
|
||||
function start() {
|
||||
scroll();
|
||||
scrollA();
|
||||
}
|
||||
</script>
|
||||
</script>
|
||||
</head>
|
||||
<body onload="start()">
|
||||
<div id="s"></div>
|
||||
<div id="s2"></div>
|
||||
</body>
|
||||
</html>
|
Loading…
Reference in New Issue
Block a user