请教关于Backbone的问题
代码如此下
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title>Hello World in Backbone.js</title>
</head>
<body>
<!-- ========= -->
<!-- Your HTML -->
<!-- ========= -->
<div id="container">Loading...</div>
<!-- ========= -->
<!-- Libraries -->
<!-- ========= -->
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js" type="text/javascript"></script>
<script src="http://cdnjs.cloudflare.com/ajax/libs/underscore.js/1.3.3/underscore-min.js" type="text/javascript"></script>
<script src="http://cdnjs.cloudflare.com/ajax/libs/backbone.js/0.9.2/backbone-min.js" type="text/javascript"></script>
<script src="http://cdnjs.cloudflare.com/ajax/libs/backbone-localstorage.js/1.0/backbone.localStorage-min.js" type="text/javascript"></script>
<!-- =============== -->
<!-- Javascript code -->
<!-- =============== -->
<script type="text/javascript">
var AppView = Backbone.View.extend({
// el - stands for element. Every view has a element associate in with HTML content will be rendered.
el: '#container',
// It's the first function called when this view it's instantiated.
initialize: function(){
this.render();
},
// $el - it's a cached jQuery object (el), in which you can use jQuery functions to push content. Like the Hello World in this case.
render: function(){
this.$el.html("Hello World");
}
});
var appView = new AppView();
</script>
</body>
</html>
刚刚开始学习Backbone的东西,请大家教我。
相关推荐
hello-backbone
你好骨干 一个回购中的杀死分析瘫痪和空白页综合症
backbone-boilerplate, 用于构建 Backbone 应用程序的工作流.zip
backbone-boilerplate, 用于构建 Backbone 应用程序的工作流 Backbone 模板这个样板是许多研究和挫折的产物。 现有boilerplates自由修改 Backbone 核心,缺少构建过程,并且非常规范;Backbone 样板文件的变更。Backbone 模板是一种组织
react-backbone:测试 React + Backbone
React主干 测试 React + Backbone
backbone:Backbone 的 Shim 存储库
主干.js Shim 存储库。 包管理器 : components-backbone : components/backbone
Backbone fundamentals
Backbone.js is a lightweight JavaScript library that adds structure to your client-side code. It makes it easy to manage and decouple concerns in your application, leaving you with code that is more maintainable in the long term. This is an open-source book about the Backbone.js library for structuring JavaScript applications.


