function Draw() { this.qwer = "asdasd"; } Draw.prototype.todraw = function() { console.log( this.qwer ); } document.getElementById("obj").onmousedown = draw.todraw; // показывает "undefined" вместо "asdasd"