-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdom.html
86 lines (76 loc) · 3.54 KB
/
dom.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
76
77
78
79
80
81
82
83
84
85
86
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Dom</title>
<script src="assets/java/dom.js" defer ></script> <!-- Script für JS-Datei (mit "defer" solte es manchmal gehen)-->
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-EVSTQN3/azprG1Anm3QDgpJLIm9Nao0Yz1ztcQTwFspd3yD65VohhpuuCOmLASjC" crossorigin="anonymous">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/font/bootstrap-icons.css">
<link rel="stylesheet" href="assets/css/style.css">
</head>
<body>
<nav>
<div class="sidenav">
<a href="index.html"><h3>Menü</h3></a>
<a href="javaStart.html"><h5>Java-Page</h5></a>
<a href="dom.html"><h5>Dom-Page</h5></a>
<a href="mySecondDom.html" class="Dom"><h5>Dom II-Page</h5></a>
<a href="logicalExpr.html" class="Dom"><h5>Log. Expr</h5></a>
<a href="validation.html" class="Dom"><h5>Validation</h5></a>
<a href="form.html" class="Dom"><h5>Form</h5></a>
</div>
</nav>
<main>
<!-- Override id("app") mit neuem Text-->
<div class="alert alert-info border border-primary" role="alert">
<h1>Override mit neuem Text!</h1>
<h1 id="app">Hello!</h1>
<!-- <script>
document.getElementById("app").style.color = "blue";
document.getElementById("app").innerHTML = "Hello Dude!";
document.getElementById("app").textContent = "Hello All!";
document.getElementById("app").innerText = "HELL-O Monday!!";
</script> -->
</div>
<div class="alert alert-warning border border-primary" role="alert">
<h1 id="app2">Hellho!</h1>
<!-- <script>
document.getElementById("app").style.color = "blue";
document.getElementById("app").innerHTML = "Hello Dude!";
document.getElementById("app").textContent = "Hello All!";
document.getElementById("app").innerText = "HELL-O Monday!!";
</script> -->
</div>
<!-- Sollte emoji verändern je nach Aktion -->
<div id="emoji-container" class="alert alert-info border border-primary">
<i id="emoji" onclick ="alert('You Clicked Me')"
onmouseover ="mOver()"
onmouseout ="mOut(this)"
class="bi bi-emoji-sunglasses">
</i>
</div>
<!-- <script src="assets/java/dom.js" async="false"></script> -->
<!-- Change Emojio in hover -->
<script>
function mOver(){
let emojiObject = document.getElementById("emoji");
emojiObject.style.color = 'blue';
emojiObject.style.fontSize = '200px';
}
function mOut(element){
element.style.color = 'red';
element.style.fontSize = '100px';
/* element.style.backgroundColor = '#f3f3f3 '; */
}
</script>
<!-- Bulb ON/OFF script exectued by onClick -->
<div style="background-color:black">
<button onclick="document.getElementById('myImage').src='assets/img/pic_bulbon.gif'">Turn on the light</button>
<img id="myImage" src="assets/img/pic_bulboff.gif" style="width:100px">
<button onclick="document.getElementById('myImage').src='assets/img/pic_bulboff.gif'">Turn off the light</button>
</div>
</main>
</body>
</html>