-
Notifications
You must be signed in to change notification settings - Fork 9
/
example.html
48 lines (37 loc) · 1.12 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
<script src='toplevel.js'></script>
<script src="http://code.jquery.com/jquery-1.11.1.min.js"></script>
<script>
$(document).ready(function(){
document.body.innerHTML += "<p>jquery document.ready called</p>";
});
</script>
<style>
<!--% if (navigator.userAgent.search(/irefox/) !== -1) { -->
body{background:#fff}
<!--% } else { -->
body{background:#eee}
<!--% } -->
.square { display: inline-block; text-align:center; padding: 1em; background: black; color: white }
</style>
<body>
<h2>View the source</h2>
<p>Here is a random number: <!--= Math.random() --></p>
The following image will never load:
<!--% if (0) { -->
<img src="3dglasses.jpg">
<!--% } -->
<p>The following stylesheet will never be applied:</p>
<!--% if (0) { -->
<style>
body{ background: green }
</style>
<!--% } -->
<p>The following javascript will never even attempt to be requested:</p>
<!--% if (0) { -->
<script src="http://code.jquery.com/jquery-1.11.1.min.js"></script>
<!--% } -->
<p>Here are a few squares I'm putting in programmatically:</p>
<!--% for(var ix = 0; ix < 5; ix++) { -->
<span class='square'><!--= ix --></span>
<!--% } -->
</body>