Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <pre class="lang-html prettyprint-override"><code>&lt;body&gt; &lt;p&gt;First name: &lt;input data-bind="value: firstName, valueUpdate: 'afterkeydown'" /&gt;&lt;/p&gt; &lt;p&gt;Last name: &lt;input data-bind="value: lastName, valueUpdate: 'afterkeydown'" /&gt;&lt;/p&gt; &lt;h2&gt;Hello, &lt;span data-bind="text: fullName"&gt; &lt;/span&gt;!&lt;/h2&gt; &lt;/body&gt; </code></pre> <p>From the <a href="http://knockoutjs.com/documentation/value-binding.html" rel="noreferrer">documentation</a></p> <blockquote> <h2>Additional parameters</h2> <ul> <li><p>valueUpdate</p> <p>If your binding also includes a parameter called valueUpdate, this defines which browser event KO should use to detect changes. The following string values are the most commonly useful choices:</p> <ul> <li><p>"change" (default) - updates your view model when the user moves the focus to a different control, or in the case of elements, immediately after any change</p></li> <li><p>"keyup" - updates your view model when the user releases a key</p></li> <li><p>"keypress" - updates your view model when the user has typed a key. Unlike keyup, this updates repeatedly while the user holds a key down</p></li> <li>"afterkeydown" - updates your view model as soon as the user begins typing a character. This works by catching the browser’s keydown event and handling the event asynchronously. </li> </ul></li> </ul> <p>Of these options, "afterkeydown" is the best choice if you want to keep your view model updated in real-time.</p> </blockquote>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload