Javatpoint Logo
Javatpoint Logo

Backbone.js model.save()

The Backbone.js save model is used to save the data of the model by delegating the sync() method. It reads and saves the model every time when it is called.

Syntax:

Parameter explanation:

attributes: It is used to define the property of a model.

options: It accepts parameters like id, name etc. which are used for a model.

Let's take an example.

See this example:

Test it now:

Output:

Save the above code in save.html file and open this file in a new browser.

BackboneJS save Model




Youtube For Videos Join Our Youtube Channel: Join Now

Feedback


Help Others, Please Share

facebook twitter pinterest

Learn Latest Tutorials


Preparation


Trending Technologies


B.Tech / MCA