function EingabeElement(x,y) {
this.x = x;
this.y = y;
this.elementId = 0;this.setX = function(sX) {
this.x = sX;
;}
Ich habe so versucht, hat aber nicht geklappt und da SELFHTML da leider keine Infos zu bietet (call habe ich zB nicht gefunden), wäre es schön, wenn mir hier einer helfen kann.
function Knopf(x,y,beschriftung) {
//Super-Konstruktor aufrufen
EingabeElement.call(this,x,y);
//Attribute
this.value = beschriftung;
return this;
}
//Ableiten
Knopf.prototype = new EingabeElement();
Knopf.prototype.constructor = Knopf;