-
Notifications
You must be signed in to change notification settings - Fork 0
/
openwindow.html
50 lines (42 loc) · 1.32 KB
/
openwindow.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
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="style.css">
</head>
<body>
<script src="openwindow.js" defer></script>
<h1>The a target attribute</h1>
<div>
<button class="opener" data-target="_self">
Click to window.open('https://mingchou.github.io/openwindow.html', '_self');
</button>
</div>
<div>
<button class="opener" data-target="_blank">
Click to window.open('https://mingchou.github.io/openwindow.html', '_blank');
</button>
</div>
<div>
<button class="opener" data-target="_parent">
Click to window.open('https://mingchou.github.io/openwindow.html', '_parent');
</button>
</div>
<div>
<button class="opener" data-target="_top">
Click to window.open('https://mingchou.github.io/openwindow.html', '_top');
</button>
</div>
<div>
<button class="noopener" data-target="_blank">
Click to window.open('https://mingchou.github.io/openwindow.html', '_blank', 'noopener');
</button>
</div>
<div>
<button class="noreferrer" data-target="_blank">
Click to window.open('https://mingchou.github.io/openwindow.html', '_blank', 'noreferrer');
</button>
</div>
<iframe src="openwindow_iframe.html" height="400" width="800"></iframe>
</body>
</html>