2013-07-19 137 views
-1

我已经开始与骨干今天有很难得到它加载它返回错误的骨干JS有没有方法扩展

Uncaught TypeError: Object function (a,b){var c,d=a|| 
{};this.cid=f.uniqueId("c");this.attributes={};b&&b.collection&& 
(this.collection=b.collection);b&&b.parse&&(d=this.parse(d,b)|| 
{});if(c=f.result(this,"defaults"))d=f.defaults({}, 
d,c);this.set(d,b);this.changed={};this.initialize.apply(this,arguments)} has no method 
'Extend' 

这实际上意味着它有没有所谓的扩展方法。

代码

<html> 
<head> 
<title></title> 
<script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jquery/1.10.1/jquery.min.js"></script> 
<script type="text/javascript" src="https://raw.github.com/douglascrockford/JSON-js/master/json2.js"></script> 
<script type="text/javascript" src="http://underscorejs.org/underscore.js"></script> 
<script type="text/javascript" src="http://backbonejs.org/backbone.js"></script> 
<script type="text/javascript"> 
    (function($){ 
     Wine = Backbone.Model.Extend(); 
    })(jQuery); 
</script> 
</head> 
<body> 
</body> 
</html> 

的是什么呢

回答

1

背后的实际问题,你有E在extend资本不知道。它应该是:

Wine = Backbone.Model.extend(); 

大写就是一切!

+2

,我的天哪,这是什么时候发生的新手有一个新的图书馆开始..感谢 –

+0

不要忘记接受这是答案! –