淘汰赛新手,Js 新手,我是一名 dot net 开发人员,正在尝试使用淘汰赛创建登录屏幕,发布数据正常,接收响应好,只是不知道如何更新单个 observable,请帮助...
function AppViewModel() {
this.email = ko.observable("Bergmail.com");
this.password = ko.observable("Password");
this.logonresult = ko.observable("logon resul");
//computed
this.Computedresult = ko.computed(function () {
return this.email() + " " + this.password();
}, this);
//behavious
this.Loginajax = function () {
var self=this
$.ajax("Indi-Dal-Json.asmx/CheckLogon" ,{
data: ko.toJSON({ email: this.email,password: this.password}),
type: "post", contentType: "application/json",
success: function (ajaxjsondata) {
{
// var parsedjson = JSON.parse(result.b);
//AppViewModel.logonresult = (result.d);
self.logonresult = ajaxjsondata.d;
}
}
});
};
}