-
Notifications
You must be signed in to change notification settings - Fork 3
/
view4.html
32 lines (24 loc) · 905 Bytes
/
view4.html
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
<html>
<head>
<link rel="stylesheet" href="css/styles.css" />
</head>
<body>
<div id="content"></div>
<script type="text/template" id="employee-tpl">
<input id="firstName" type="text" value="<%= firstName %>" /><br/>
<input id="lastName" type="text" value="<%= lastName %>" /><br/><br/>
<button class="save">Save</button>
</script>
<script type="text/javascript" src="lib/jquery-1.7.2.min.js"></script>
<script type="text/javascript" src="lib/underscore-min.js"></script>
<script type="text/javascript" src="lib/backbone-min.js"></script>
<script type="text/javascript" src="js/employee-model.js"></script>
<script type="text/javascript" src="js/employee-view.js"></script>
<script type="text/javascript">
employee = new Employee({id: 1});
employee.fetch({success: function() {
new EmployeeView({model: employee, el: '#content'});
}});
</script>
</body>
</html>