3
<input type="text" data-bind="value: classCode, valueUpdate: 'afterkeydown', event: { keypress: doSomething}">
我看不到我輸入的號碼。如何在knockout.js中更新值後執行某些操作?
<input type="text" data-bind="value: classCode, valueUpdate: 'afterkeydown', event: { keypress: doSomething}">
我看不到我輸入的號碼。如何在knockout.js中更新值後執行某些操作?
你應該add a handler到觀察的本身:
viewMOdel.classCode.subscribe(function() { ... });