forked from Rappsilber-Laboratory/xiview
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest.php
More file actions
42 lines (34 loc) · 933 Bytes
/
test.php
File metadata and controls
42 lines (34 loc) · 933 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
<!doctype html>
<html>
<head>
<title>Hello Backbone</title>
<script type="text/javascript" src="./vendor/underscore.js"></script>
<script type="text/javascript" src="./vendor/zepto.js"></script>
<script type="text/javascript" src="./vendor/backbone.js"></script>
</head>
<body>
<div id="hello">
</div>
<script>
//<![CDATA[
var Model = Backbone.Model.extend({
//~ defaults: {
//~ title: 'When seagulls attack',
//~ completed: false
//~ },
urlRoot:"./API/v1/"
});
var View = Backbone.View.extend({
render: function(){
el.innerHTML = JSON.stringify(this.model.attributes);
}
});
var model = new Model({id:'1.php'});
model.fetch();
//var View = new View (document.getElementById('hello'));
document.getElementById('hello').innerHTML =
JSON.stringify(model.attributes);
//]]>
</script>
</body>
</html>