[FlyingTable]

Zelle 1 Zelle 2
Zelle 3 Zelle 4

Mit DHTML kann man so ziemlich alles fliegen lassen, sogar Tabellen...

[Code]

[zwischen <HEAD> und </HEAD>]

<script language="JavaScript">

<!-- by nightfire
var x1,y1,x2,y2,x3,y3,x4,y4,w,h,DistX,DistY,HopX,HopY,Count
var ImgW = 320 // Breite der Grafik
var ImgH = 320 // Höhe der Grafik
var Step = 500 // Anzahl Schritte (bestimmt Geschwindigkeit)
Count = 0

function init() {

// Bestimmung der Anfangsposition
x1 = 0
y1 = 0

// Bestimmung der Endposition
x2 = 400
y2 = 400

// Bestimmung der Distanz
DistX = x2 - x1
DistY = y2 - y1

// Distanz pro Schritt
HopX = DistX/Step
HopY = DistY/Step

move_it();
}

function move_it() {

document.getElementById("table1").style.top = x1;
document.getElementById("table1").style.left = y1;

x1=x1+HopX
y1=y1+HopY
Count = Count + 1
if (Count <= Step) window.setTimeout("move_it()", 10);
}

//-->
</script>

[IN den <BODY> Tag]

onLoad="init();"

[zwischen <BODY> und </BODY>]

<div id="table1" style="position:absolute;;top:9px; border: double thin red">
<table>
<tr>
<td>Zelle 1</td>
<td>Zelle 2</td>
</tr>
</table>
</div>

[Autor]

N8i (www.nightfire.ch)

[Download]

Kopieren Sie bitte den Code

Copyright © 1998- Nightfire Webworker Archiv Script No: 580