-
StackOverflow 文档
-
backbone.js 教程
-
backbone.js 入门
-
Hello Web(基本 Hello World 类型设置)
<html>
<head>
<script src="https://code.jquery.com/jquery-3.1.0.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/underscore.js/1.8.3/underscore-min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/backbone.js/1.3.3/backbone-min.js"></script>
<script>
$( function(){
( function(){
var View = Backbone.View.extend( {
"el": "body",
"template": _.template( "<p>Hello, Web!</p>" ),
"initialize": function(){
this.render();
},
"render": function(){
this.$el.html( this.template() );
}
} );
new View();
})()
} );
</script>
</head>
<body>
</body>
</html>