Bonjour,
c'est certainement qu'un petit detail qui m'échappe, comme d'habitude...
Voici une classe avec une seule methode. Le problème survient quand j'appelle la fonction init : "this.init is not a function" me dit firefox ? pourquoi ?
Merci
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
 
function getInfos(x, y){
	this.x = x;
	this.y = y;
	this.init();
}
 
getInfos.prototype.init = function(){
        alert("init");
        ...
}