Wednesday 15 January 2014

javascript - Simple backbone.js issue -


I do not understand why this is not working for life ... < P> It attains the spinal cord and does not underline any problems, and will not promote any errors, but it will not show the world to the console.

  & lt; Body & gt; & Lt; Script src = "D: /underscore.js" & gt; & Lt; / Script & gt; & Lt; Script src = "D: /" & gt; & Lt; / Script & gt; & Lt; Script type = "text / javascript" & gt; Person = Backbone.Model.extend ({initialize: function () {console.log ('Hello World');}}); & Lt; / Script & gt; & Lt; / Body & gt; & Lt; / Head & gt;  

You must create a new person Specify the properties. Then add:

  var myPerson = new person ();   

At the end of your script tag. And that should work.

No comments:

Post a Comment