質問編集履歴
1
ソースコード追記
test
CHANGED
File without changes
|
test
CHANGED
@@ -13,3 +13,89 @@
|
|
13
13
|
|
14
14
|
|
15
15
|
よろしくお願いします。
|
16
|
+
|
17
|
+
|
18
|
+
|
19
|
+
|
20
|
+
|
21
|
+
####ソースコード追記
|
22
|
+
|
23
|
+
(window.openに関わらず、aタグの_blankで別タブで開いても同じでした)
|
24
|
+
|
25
|
+
|
26
|
+
|
27
|
+
↓ index.html
|
28
|
+
|
29
|
+
|
30
|
+
|
31
|
+
```html
|
32
|
+
|
33
|
+
<!DOCTYPE html>
|
34
|
+
|
35
|
+
<html lang="ja">
|
36
|
+
|
37
|
+
<head>
|
38
|
+
|
39
|
+
<meta charset="UTF-8">
|
40
|
+
|
41
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
42
|
+
|
43
|
+
<title>Index</title>
|
44
|
+
|
45
|
+
</head>
|
46
|
+
|
47
|
+
<body>
|
48
|
+
|
49
|
+
|
50
|
+
|
51
|
+
<a href="window.html" target="_blank">window.html</a>
|
52
|
+
|
53
|
+
|
54
|
+
|
55
|
+
</body>
|
56
|
+
|
57
|
+
</html>
|
58
|
+
|
59
|
+
```
|
60
|
+
|
61
|
+
|
62
|
+
|
63
|
+
↓window.html
|
64
|
+
|
65
|
+
|
66
|
+
|
67
|
+
```html
|
68
|
+
|
69
|
+
<!DOCTYPE html>
|
70
|
+
|
71
|
+
<html lang="ja">
|
72
|
+
|
73
|
+
<head>
|
74
|
+
|
75
|
+
<meta charset="UTF-8">
|
76
|
+
|
77
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
78
|
+
|
79
|
+
<title>Window</title>
|
80
|
+
|
81
|
+
</head>
|
82
|
+
|
83
|
+
<body>
|
84
|
+
|
85
|
+
|
86
|
+
|
87
|
+
<script>
|
88
|
+
|
89
|
+
window.onbeforeunload = function(e) {
|
90
|
+
|
91
|
+
e.returnValue = "本当に閉じますか?";
|
92
|
+
|
93
|
+
}
|
94
|
+
|
95
|
+
</script>
|
96
|
+
|
97
|
+
</body>
|
98
|
+
|
99
|
+
</html>
|
100
|
+
|
101
|
+
```
|