input.onchange = (function(func,pid) { return function() { console.log(func); func.changeRace(pid); }})(this.self,pid);