2011-09-19 93 views

回答

6

change每次更改模型的屬性時都會觸發該事件。此事件針對模型本身以及模型所屬的任何集合進行觸發。

someCollection.bind("change", function(model, attributes){ 
    // do something with the model, here 
}); 
+0

當我someCollection.fetch(),你給的功能將工作,我是對的? –

+1

沒有。 fetch會爲集合引發一個「重置」事件 –