-
Notifications
You must be signed in to change notification settings - Fork 5
/
gengar.html
58 lines (44 loc) · 1.34 KB
/
gengar.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
<!DOCTYPE html>
<html>
<body>
<style>
body {
background-image: url("https://upload.wikimedia.org/wikipedia/en/b/bf/Pok%C3%A9mon_Gengar_art.png");
}
</style>
<script>
var r = 255;
var g = 255;
var b = 255;
function buttonPress(){
document.body.style.backgroundColor="rgb(255,0,0)";
}
function sliderChange(){
document.body.style.backgroundColor=("rgb("+r+","+g+","+b+")")
document.getElementById('colors').innerText="R: " + r + " G: " + g + " B: " + b
}
function sliderChangeR(val){
r = val;
sliderChange();
}
function sliderChangeG(val){
g = val;
sliderChange();
}
function sliderChangeB(val){
b = val;
sliderChange();
}
</script>
<b> All About Gengars </b>
<h1> Links: </h1>
<p>
<a href="index.html"> Go Back to the Home Page </a> <br>
<button onclick="buttonPress()">Please don't feed the Gengars After Midnight</button> <br>
<p id="colors">R: 255 G: 255 B: 255</p> <br>
<input type="range" id="slider" min="0" max="255" onchange="sliderChangeR(this.value)"/> <br>
<input type="range" id="slider" min="0" max="255" onchange="sliderChangeG(this.value)"/> <br>
<input type="range" id="slider" min="0" max="255" onchange="sliderChangeB(this.value)"/> <br>
</p>
</body>
</html>