Data Binding with JavaScript

This demonstrates an object which has getter and setter methods as well as the ability to assign callbacks. This means that you can have your views automatically update when the data is changed.

When the page is loaded, myData.set({"foo": "bar"}); is run.








Here's another example with textboxes that update each other.