-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSwitch.html
More file actions
40 lines (26 loc) · 1.07 KB
/
Switch.html
File metadata and controls
40 lines (26 loc) · 1.07 KB
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
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>Toggle Switch Demo</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=0, minimum-scale=1.0, maximum-scale=1.0" />
<meta name="apple-mobile-web-app-capable" content="yes" />
<meta name="apple-mobile-web-app-status-bar-style" content="black" />
<link href="../style.css" rel="stylesheet" type="text/css" />
<!-- JavaXT Includes -->
<script type="text/javascript" src="../../src/switch/Switch.js"></script>
<script type="text/javascript" src="../../src/utils/Utils.js"></script>
<script type="text/javascript">
window.onload = function() {
var value = document.getElementById("value");
var toggleSwitch = new javaxt.dhtml.Switch(document.getElementById("switch"));
toggleSwitch.onChange = function(val){
value.innerHTML = "Value: " + val;
};
};
</script>
</head>
<body>
<div id="switch"></div>
<div id="value" style="padding:5px;"></div>
</body>
</html>