function ViewModel() { var self = this; self.technique = ko.observable(""); self.technique.subscribe(function (newValue) { self.techniqueText($("input[name=aspnet]:checked").next().text()); }); self.techniqueText = ko.observable(""); } ko.applyBindings(new ViewModel());
<label> <input name="aspnet" type="radio" value="webforms" data-bind="checked: technique" /><span>ASP.NET Web Form</span></label> <label> <input name="aspnet" type="radio" value="mvc" data-bind="checked: technique" /><span>ASP.NET MVC</span> </label> <label> <input name="aspnet" type="radio" value="webapi" data-bind="checked: technique" /><span>ASP.NET Web API</span> </label> <div data-bind="text: techniqueText"></div>