-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
executable file
·71 lines (59 loc) · 2.79 KB
/
index.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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
<!DOCTYPE html>
<html lang="en">
<head>
<title></title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="css/style.css">
</head>
<body>
<h1 class="platform"></h1>
<form>
<input type="radio" name="selection" value="n"><label for="n"><span></span>No</label>
<input type="radio" name="selection" value="s" class="error"><label for="s"><span></span>Si</label>
<input type="radio" name="selection" value="p"><label for="p"><span></span>NPI</label>
</form>
<!-- <form>
<input type="checkbox" name="selection" value="n"><label for="n"><span></span>No</label>
<input type="checkbox" name="selection" value="s" class="error"><label for="s"><span></span>Si</label>
<input type="checkbox" name="selection" value="p"><label for="p"><span></span>NPI</label>
</form> -->
<br/>
<input id="default" type="button" value="default">
<input id="android" type="button" value="android">
<input id="ios" type="button" value="ios">
<input id="alert" type="button" value="alert">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
<script src="js/script.js"></script>
<script>
$( document ).ready(function() {
$('#android').on("click", function() {
changePlatform($(this).attr("value"));
});
$('#ios').on("click", function() {
changePlatform($(this).attr("value"));
});
$('#default').on("click", function() {
removeStyle();
});
$('#default').on("click", function() {
removeStyle();
});
$('#alert').on("click", function() {
alertMessage();
});
changePlatform = function(platform){
removeStyle();
$('<link/>', {rel: 'stylesheet', href: 'css/style' + ( platform ? '.' + platform : '' ) + '.css'}).appendTo('head');
$('<script/>', {src: 'js/script' + ( platform ? '.' + platform : '' ) + '.js'}).appendTo('body');
}
removeStyle = function() {
$("link[href*='css/style.android.css']").remove();
$("link[href*='css/style.ios.css']").remove();
$("script[src*='js/script.android.js']").remove();
$("script[src*='js/script.ios.js']").remove();
};
});
</script>
</body>
</html>