Hier der Code:
Code: Alles auswählen
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Unbenanntes Dokument</title>
<script type="text/javascript">
function Debug() {
alert("Lorem ipsum dolor sit amet!");
}
function myClass(X,Y,Width,Height) {
this.X = X;
this.Y = Y;
this.Width = Width;
this.Height = Height;
this.Debug = Debug;
this.index = 6365;
}
obj1 = new myClass();
obj1.X = 252;
obj1.Y = 102;
obj2 = new myClass();
obj2.X = 467;
obj2.Y = 661;
obj3 = new myClass();
obj3.X = 374;
obj3.Y = 823;
for(Element in obj1) {
//<![CDATA[
alert(obj1[Element]);
//]]>
}
</script>
</head>
<body>
</body>
</html>