JSFiddle - React, Tailwind, and code Playground
HTML
<input type="text" id="input2" data-bind="value: name"/>
<div id='result'>
The input value is: <span data-bind="text: name"></span>
</div>
<a href='#' id='update'>Update input value by javascript</a>
JavaScript
var viewModel = {
name: ko.observable()
};
ko.applyBindings(viewModel);
document.getElementById('update').onclick = function(){
document.getElementById('input2').value = 'New Value';
}