-
Notifications
You must be signed in to change notification settings - Fork 1
/
dontEditThis.html
66 lines (65 loc) · 2.34 KB
/
dontEditThis.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
<html>
<head>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.1/css/bootstrap.min.css">
<style>
.btn{
margin:20px 0;
}
</style>
<script src="https://unpkg.com/babel-standalone@6/babel.min.js"></script>
<script type="text/javascript" src="es6Classes.js"></script>
<script type="text/javascript" src="es6Arrows.js"></script>
<script type="text/javascript" src="es6Vars.js"></script>
</head>
<body>
<div class="container">
<h1 class="panel-heading">ES6 Homework 2018</h1>
<div class="panel-group">
<div class="panel panel-primary" id="es6Class">
<div class="panel-heading">ES6 Classes</div>
<div class="panel-body">
<span id="es6ClassesSpan"> Edit ES6Classes</span>
</div>
</div>
<div class="panel panel-primary" id="es6Vars">
<div class="panel-heading">ES6 Let/Const</div>
<div class="panel-body">
<span id="es6VarsSpan"> Edit ES6Vars</span>
</div>
</div>
<div class="panel panel-primary" id="es6Arrows">
<div class="panel-heading">ES6 Arrows</div>
<div class="panel-body">
<span id="es6ArrowsSpan"> Edit ES6Arrows </span>
</div>
</div>
</div>
<button class="btn btn-primary pull-right" onclick="location.reload()">Run <span class="glyphicon glyphicon-play" /></button>
</div>
</body>
<footer>
<script>
try{
document.getElementById("es6ClassesSpan").innerHTML = "Good job, you've made" + " " + characterOne.name + " " + "who is " + characterOne.age + " years old and has the stats of:<br> " + characterOne.addStats(Math.floor((Math.random() * 20) + 1), Math.floor((Math.random() * 20) + 1), Math.floor((Math.random() * 20) + 1), Math.floor((Math.random() * 20) + 1), Math.floor((Math.random() * 20) + 1));
document.getElementById("es6Class").classList.replace("panel-primary", "panel-success");
}
catch(e){
console.log("Error is: " + e.name + ":" + e.message);
}
try{
document.getElementById("es6ArrowsSpan").innerHTML = sendCharacterOff();
document.getElementById("es6Arrows").classList.replace("panel-primary", "panel-success");
}
catch(e){
console.log("Error is: " + e.name + ":" + e.message);
}
try{
document.getElementById("es6VarsSpan").innerHTML = letsGiveSupplies();
document.getElementById("es6Vars").classList.replace("panel-primary", "panel-success");
}
catch(e){
console.log("Error is: " + e.name + ":" + e.message);
}
</script>
</footer>
</html>