Hallo zusammen.
Mein Ziel: Ein jpg-file soll endlos vertikal laufen
Das Problem:
document.getElementById("denk").style.top = y;
document.all["denk"].style.posTop = y;
document.getElementById("denk").style.posTop = y;
das geht nicht.
html:
<html>
<head>
<title>rechts</title>
<LINK REL="Stylesheet" TYPE="text/css" HREF="css/style.css">
</head>
<body><div id="denk"><img src="images/denk.jpg" width="31" height="62"></div>
</body>
</html>
css:
<!--
#denk
{
position: absolute;
top 0;
left: 0;
z-index: 3;
}
//-->
js:
<!--
//Bild jpg vertikale Position hoch/runter
var y = 1;
var schritt = 1;
whatbrowser();
while(true)
{
if(y < 0 | y >= screen.availHeight)
{
schritt =- schritt;
if(ie)
{
//document.getElementById("denk").style.top = y;
document.all["denk"].style.posTop = y;
//document.getElementById("denk").style.posTop = y;
}
if(ns)
{
document.getElementById("denk").top = y;
}
}
y += schritt;
}
function whatbrowser()
{
ns = (document.layers)?true:false;
ie = (document.all)?true:false;
}
//-->