function Main() {this.name = "Max";}
//Создает кнопку
Main.prototype.create_button = function(){
var body = document.getElementsByTagName('body')[0];
var button= document.createElement("INPUT");
button.onclick = this.say_hello.bind(this);
//button.onclick = hello.say_hello;//Так работает как надо
}
Main.prototype.say_hello = function(){alert('hello '+this.name);}//Не работает так как this здесь возвращает вместо объекта input, при условии если функция динамически вешается на кнопку
var hello = new Main();
hello.create_button();
Имена классов следует называть с большой буквы.