質問編集履歴
1
コード追加
title
CHANGED
File without changes
|
body
CHANGED
@@ -7,12 +7,16 @@
|
|
7
7
|
|
8
8
|
```javascript
|
9
9
|
var win = window.open('', 'child', 'height=100,width=100');
|
10
|
+
win.write('<html><head>');
|
11
|
+
win.write('<script type="text/javascript">');
|
10
12
|
win.write(`<!--
|
11
13
|
function clickBtn(){
|
12
14
|
window.close();
|
13
15
|
}
|
14
16
|
-->`);
|
17
|
+
win.write('</script></head><body>');
|
15
18
|
win.write('<input type="button" value="閉じる" onClick="clickBtn()">');
|
19
|
+
win.write('</body></html>');
|
16
20
|
```
|
17
21
|
|
18
22
|
3の子画面が閉じる→親画面のイベント(関数)が走り出す、というところで躓いており、どうにか子画面が閉じたことを親画面側で検知させる方法を探しております。
|