Passing parameter using onclick or a click binding with KnockoutJS

前端 未结 5 2107
遥遥无期
遥遥无期 2020-12-25 09:54

I have this function:

function make(place)
{
  place.innerHTML = \"somthing\"
}

I used to do this with plain JavaScript and html:



        
5条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2020-12-25 10:26

    Use a binding, like in this example:

    
      Search Manager
    
    
    var ViewModelStructure = function () {
        var self = this;
        this.SearchManager = function (search) {
            console.log(search);
        };
    }();
    

提交回复
热议问题