I have made few of my examples like:

selectBox

onClick

onChange

htmlBind

template

addSelectBox

addSelectBoxWthOutFunction

Important thing is line:

ko.applyBindings(new ViewModel());

Where ViewModel must be like:

var ViewModel = function () {
	this.myClick = function () {
		alert('Yo! This is a test!');
	}
};