<?xml version="1.0" encoding='utf-8'?>
<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN" "http://www.wapforum.org/DTD/wml_1.1.xml">
<wml>
<card id="card1" title="Knockout (web framework) - Page 3 - Wikipedia">
<p>
<a accesskey="1" href="page.php?w=Knockout_(web_framework)&amp;p=2">1.Previous</a><br />
<a accesskey="3" href="page.php?w=Knockout_%28web_framework%29&amp;p=4">3.Next</a>
</p>
<p>Templating (contains a dedicated template engine, but other templating engines can be used)</p>

<p><big> Examples </big></p>
<p>1. In this example, two text boxes are bound to observable variables on a data model. The "full name" display is bound to a dependent observable, whose value is computed in terms of the observables. When either text box is edited, the "full name" display is automatically updated, with no explicit event handling.</p>

<p><big> ViewModel (JavaScript) </big></p>
<p><syntaxhighlight lang="javascript">function ViewModel() {    this.firstName = ko.observable("");    this.lastName = ko.observable("");</syntaxhighlight></p><p>
<a accesskey="1" href="page.php?w=Knockout_(web_framework)&amp;p=2">1.Previous</a><br />
<a accesskey="3" href="page.php?w=Knockout_%28web_framework%29&amp;p=4">3.Next</a>
</p>

<do type="prev" label="Search">
        <go href="search.wml"/>
</do>

</card>
</wml>
