Two-way data binding refers to the ability to bind changes to an object’s properties to changes in the UI, and vice-versa.
Can we achieve 2-way data-binding with Jav
Yes, we can achieve the two way data binding using pure javascript.
twoWay=function(event) { var elem = document.getElementsByClassName(event.currentTarget.className); for(var key in elem){ elem[key].value=event.currentTarget.value; } }
You can check the jsfiddle.