-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathexample.html
51 lines (42 loc) · 1.06 KB
/
example.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
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title>This is a page - yo</title>
<style>
body{
background: #AAA;
color: #000;
padding: 20px 100px;
}
</style>
<script type="text/javascript">
// dynamicaly add the script in the page
var tagAdded = false,
showThem;
showThem = function () {
if(tagAdded){
console.log("Script allready added");
return;
}
tagAdded = true;
console.log("Add Script");
var script = document.createElement('script');
script.onload = function() {
console.log("Script loaded");
};
script.src = "./src/showTags.js";
document.getElementsByTagName('head')[0].appendChild(script);
};
</script>
</head>
<body>
<h1>Bonjour !</h1>
<p>J'aime bien faire <em>des choses</em></p>
<h2>Voilà</h2>
<code><pre>trace("tout va bien")</pre></code>
<p>
<a href="javascript:showThem();">Show Tags</a>
</p>
</body>
</html>