http://learn.knockoutjs.com/#/?tutorial=intro 直接在线学习
<!– This is a view – HTML markup that defines the appearance of your UI –>
First name:
Last name:
Full name:
First name:
Last name:
// This is a simple viewmodel – JavaScript that defines the data and behavior of your UI function AppViewModel() { this.firstName = ko.observable(“Bert”); this.lastName = ko.observable(“Bertington2121″); this.fullName = ko.computed(function(){ return this.firstName()+” “+ this.lastName(); },this); } // Activates knockout.js ko.applyBindings(new AppViewModel());
knockoutjs 练习界面:
发表回复
要发表评论,您必须先登录。