-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathexperiment.html
75 lines (74 loc) · 2.87 KB
/
experiment.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
72
73
74
75
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Experimenting Around</title>
<style>
#entertext {
background-color: aqua;
margin: 50px;
padding: 50px;
display: block;
}
#ptext {
float:right;
}
</style>
</head>
<body>
<div id = inital>
<h1>Time to experiment with javascript!</h1>
<p id ="hiddentext"></p>
<button id="show">show</button>
<button id="main">Main</button>
<button id="add">add</button>
<button id ="style">Style</button>
<button id="color">Color</button>
<button id ="size">font size</button>
<hr>
<button id="disappear">BEGONE</button>
<button id ="appear">CUM BACK</button>
<hr>
</div>
<button id="circles">Disappearing Circles Project!</button>
<div id = "entertext">
<input id="inputtext" type = "text" placeholder="Enter text here">
<button id ="enterbutton">Enter</button>
<p id = "ptext">Here is some random text haha yes lol.</p>
</div>
<script type="text/javascript">
//entertext starts here
const enterbutton = document.getElementById("enterbutton");
const ptext = document.getElementById("ptext");
const inputtext = document.getElementById("inputtext");
enterbutton.onclick =()=> ptext.innerHTML = inputtext.value;
//all the initial stuff
document.getElementById("show").onclick = function() {
document.getElementById("hiddentext").innerHTML = "Lorem ipsum dolor cats love to eat" ;
}
document.getElementById("main").onclick = function(){
window.location.href = "ak-bio.html";
}
document.getElementById("add").onclick = function(){
document.getElementById("hiddentext").innerHTML += " boots and cats and";
}
document.getElementById("style").onclick = function(){
document.getElementById("hiddentext").style.fontFamily = "monospace";
}
document.getElementById("color").onclick = function(){
document.getElementById("hiddentext").style.color = "red";
}
document.getElementById("size").onclick = function(){
document.getElementById("hiddentext").style.fontSize = "30px";
}
document.getElementById("disappear").onclick = function(){
document.getElementById("hiddentext").style.display = "none";
}
document.getElementById("appear").onclick = function(){
document.getElementById("hiddentext").style.display = "inline";
}
document.getElementById("circles").onclick = () => window.location.href="disappearing_circles.html";
</script>
</body>
</html>