Torsche: clip Netscape6

Beitrag lesen

Danke Marcus
Aber warum geht dann wieder nicht:

<html><head><title>Div clippen</title>
<style>
.pos1{position:absolute;left: 0px;top: 10px;width: 550px;height: 80px;clip:rect(79px 550px 80px 0px)}
.pos2{position:absolute;left: 0px;top: 400px;width: 550px;height: 80px;clip:rect(0px 550px 100px 0px)}
</style>
</head>
<script>
var t=79;
var r=550;
var b=80;
var l=0;
function rechne()
{if (t<=0){alert ("ok")}
else {t--;schneid(t,r,b,l);}}
function schneid(t,r,b,l)
{if (document.layers)
{document.t0.clip.top = t;document.t0.clip.right = r;
document.t0.clip.bottom = b;document.t0.clip.left = l;window.setTimeout ('rechne()',10)}
else if(document.all) {document.all.t0.style.clip ="rect("+t+"px, "+r+"px, "+b+"px, "+l+"px)";window.setTimeout ('rechne()',10)}
else{document.getElementsById.t0.style.clip=rect("+t+"px, "+r+"px, "+b+"px, "+l+"px);window.setTimeout ('rechne()',10)}}
</script>
<body>
<div id="t0" class="pos1"><img border="0" src="line.gif" width="550" height="80"></div>
<div id="t1" class="pos2"><img border="0" src="line.gif" width="550" height="80"></div>
<A HREF="javascript:rechne();">schneide</a>
</body>
</html>