Added composite&observer design implement by javascript.