Knockout is a standalone JavaScript implementation of the Model-View-ViewModel pattern with templates.For more info http://en.wikipedia.org/wiki/KnockoutJS
Introduction
This article explains about how to use form field bindings using knockout.js
The click binding invokes a handler when the element is clicked.
<button data-bind="click: addproduct">Add Product</button>
The event binding adds handlers to the element for the specified events.
<div data-bind="event: { mouseout: showcontent, mousein: hideHelp }">content</div>
The submit binding allows us to invoke a handler when a form is submitted.
<form data-bind="submit: saveData">…</form>
The enable binding controls whether the form element is enabled only when the parameter value is true.
<input data-bind="enable: isEditable, value: name" />
The disable binding causes the associated element to be disabled only when the parameter value is true. This is useful with form elements like input, select, and textarea.
<input data-bind="disable: isReadOnly, value: name" />
It enables two-way binding of the field’s value to a view model value.
<p>Your value: <input data-bind="value: someValue, valueUpdate: 'afterkeydown'" /></p>
It shows the field focus when the value is set to true
<input data-bind="visible: editing, value: name, hasFocus: editing" />
It shows the true or false whether the checkbox is checked
when we update the value in our view model, this checks or unchecks the form control on screen.
<input type="checkbox" data-bind="checkedValue: $data, checked: $root.chosenItems" />
It will populate the dropdownlist with options
<p>Choose some countries you'd like to visit: <select data-bind="options: availableCountries" size="5" multiple="true"></select></p>
Conclusion
In this article we have learned about different form field bindings in Knockout.js
Reference
http://knockoutjs.com