开发者

Event won't fire in event binding for "onblur"

I am trying to get some events to run using knockoutjs and for the life of me cannot figure this out. I've made a simple example to demonstrate the most basic idea of the syntax i am using with no succes开发者_JAVA技巧s:

<input type="text" 
       data-bind="event: {onblur: function(){ alert('worked!') }}, 
                  value: signUpModel.fullName, 
                  valueUpdate: 'afterkeydown'" 
       maxlength="40" 
       id="inputFullName" />

Shouldn't this work?


You will want to just use blur instead of onblur. The framework handles it properly depending on whether is uses jQuery to attach the event or does it itself (no jQuery available).

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜