简体   繁体   中英

How to get which specific attribute of model has been changed? Is this possible in Backbone.js?

So for example, I have a model with attributes: firstName, lastName, age, skills, race, birthdate, and about 20 more...

I want to get which specific attributes were changed (if user changes some) and do a .save() placing the specific attributes that were changed as arguments for .save({...})

Any way I can do this?

note: backbone.js newbie

见细骨干文档, http://documentcloud.github.com/backbone/#Model-change特别hasChangedchangedAttributes

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM