Knockout.js - javascript function on data-bind

后端 未结 5 1535
天命终不由人
天命终不由人 2021-02-12 12:38

Is there a way i can call JavaScript function on data-bind like this:

         


        
5条回答
  •  无人共我
    2021-02-12 13:00

    I have managed to do this by using the context. If you need the whole code I can send it to you.

    function currentProgram(context){ var title = '' + context.$data.name + ''; return title; }

    You will also need to set this

           $.ajaxSetup({
              async: false
            });
    

提交回复
热议问题