-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathwindow.html
More file actions
71 lines (59 loc) · 1.74 KB
/
window.html
File metadata and controls
71 lines (59 loc) · 1.74 KB
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
<!DOCTYPE html>
<html>
<head>
<title>Complete JavaScript Course</title>
</head>
<body>
<div id="wrapper"> </div>
<script>
var output = document.getElementById('wrapper');
console.dir(window);
for (var prop in window) {
document.write(prop + " " + window[prop] + "<br>");
}
output.innerHTML += window.innerHeight + " " + window.innerWidth;
output.innerHTML += window.location;
// alert('hello');
var w = window.open('index2.html');
w.onbeforeunload = function () {
alert("don't go anywhere");
}
</script>
</body>
</html>
-------------------------------------------------------------------------------------------------
<!DOCTYPE html>
<html>
<head>
<title>Complete JavaScript Course</title>
</head>
<body>
<div id="wrapper"></div> <a href="index3.html">Index3</a> <a href="index.html">Index</a> <a
href="index2.html">Index2</a>
<input type="button" onclick="goBack()" value="Back">
<script>
var output = document.getElementById('wrapper');
function goBack() {
window.history.go(-1);
}
</script>
</body>
</html>
-------------------------------------------------------------------------------------------------
<!DOCTYPE html>
<html>
<head>
<title>Complete JavaScript Course</title>
</head>
<body>
<div id="wrapper">Page 1</div> <a href="index3.html">Index3</a> <a href="index.html">Index</a> <a
href="index2.html">Index2</a>
<input type="button" onclick="alert('hello world\'s:')" value="Alert">
<script>
var output = document.getElementById('wrapper');
function goBack() {
window.history.go(-1);
}
</script>
</body>
</html>