1、模型javascript
1.1 建立一個模型java
var InvoiceItemModel = Backbone.Model.extend({ //代碼 })
1.2 複製一個模型code
newModel = InvoiceTtemModel.clone();
1.3得到一個屬性值blog
var value1 = InvoiceItemModel.get('value');
1.4更新/建立屬性值ip
//一個 InvoiceItemModel.set('quantity',5); //多個 InvoiceItemModel.set({ quantity:'2', price:true })
1.5刪除一個屬性get
InvoiceItemModel.unset('quantity');
1.6刪除全部屬性it
InvoiceItemModel.clear();
先寫到這,等有時間在補充…… class