BackboneJS - Event - On - Backbone.js

Description

It binds an event to an object and the callback function. Whenever an event is fired, it executes the callback.

Syntax


Parameters

  • event − It binds an object.
  • callback − It is the reference to the code.
  • context − It is an object that can be passed to a callback function.

Example


Output

Let us carry out the following steps to see how the above code works −

  • Save above code in on.htm file
  • Open this HTML file in a browser.

output

All rights reserved © 2020 Wisdom IT Services India Pvt. Ltd DMCA.com Protection Status

Backbone.js Topics