-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathexperiment.html
75 lines (64 loc) · 2.11 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>
<head>
<title>Hassan Khairi's Website</title>
<meta charset="UTF-8" />
<link rel="stylesheet" href="styles.css" />
</head>
<body>
<main>
<h1>Hassan Khairi</h1>
<nav id="nav">
<ul>
<li> <a href="/home.html">Home</a> </li>
<li> <a href="/about.html"> About Me </a> </li>
<li><a href="/projects.html"> My Projects </a></li>
<li><a href="/contact.html">Contact Me </a></li>
<li><a href="/experiment.html">Experiment</a></li>
</ul>
</nav>
</main>
<pre>This is an <code>experimental</code> page!</pre>
<hr>
<audio controls>
<source src="watermelon.mp3" type="audio/mp3">
Your browser does not support the audio tag.
</audio>
<svg width="100" height="100">
<circle cx="50" cy="50" r="40" stroke="grey" stroke-width="2" fill="blue" />
</svg>
<video width="320" height="240" controls>
<source src="rk.mp4" type="video/mp4">
Your browser does not support the video tag.
</video>
<iframe src="https://www.youtube.com">
</iframe>
<br>
<form>
<label for="browser">Choose your browser from the list:</label>
<input list="browsers" name="browser" id="browser">
<datalist id="browsers">
<option value="Edge">
<option value="Firefox">
<option value="Chrome">
<option value="Opera">
<option value="Safari">
</datalist>
<input type="submit">
</form>
<div id="container"></div>
<template id="template">
<div>Click me</div>
</template>
<script>
const container = document.getElementById("container");
const template = document.getElementById("template");
function clickHandler(event) {
event.target.append(" — Clicked this div");
}
const secondClone = template.content.firstElementChild.cloneNode(true);
secondClone.addEventListener("click", clickHandler);
container.appendChild(secondClone);
</script>
</body>
</html>