-
Notifications
You must be signed in to change notification settings - Fork 1
/
example2.html
41 lines (40 loc) · 1.68 KB
/
example2.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
33
34
35
36
37
38
39
40
41
<!DOCTYPE html>
<html>
<head>
<script type="text/javascript" src="./lib/jquery-1.7.2.js"></script>
<script type="text/javascript" src="./lib/knockout-2.0.0.debug.js"></script>
<script type="text/javascript" src="./src/Example2.js"></script>
<link href="css/bootstrap.min.css" rel="stylesheet">
<link href="css/tutorial.css" rel="stylesheet">
</head>
<body>
<div class="container">
<div class="page-header">
<h1>Duplicator <small>verdoppeln</small></h1>
</div>
<div class="row">
<div class="span6">
<form class="form-inline">
<fieldset class="control-group" data-bind="css: {error: !inputValidation()}">
<div class="controls">
<input autofocus class="span2" placeholder="Input" type="text" data-bind="value: input"/>
<button class="btn" data-bind="click: calc">calculate!</button>
<span class="help-inline error" data-bind="text: validationMessage"></span>
</div>
</fieldset>
</form>
</div>
</div>
<div class="row">
<div class="span2 decoration"><span data-bind="text: input"></span> x 2</div>
</div>
<div class="row">
<div class="span2 result" data-bind="text: output"></div>
</div>
</div>
<script>
var model = DuplicatorExample2();
ko.applyBindings(model)
</script>
</body>
</html>