-
Notifications
You must be signed in to change notification settings - Fork 0
/
pop.html
30 lines (27 loc) · 1.03 KB
/
pop.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
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Insert title here</title>
<script type="text/javascript">
function recieve(){
var txt = "<font color='red'>부모창에서 받아온 값</font>";
document.getElementById("process").innerHTML = txt;
document.myform.receiver.value = window.opener.document.myform.sender.value;
}
function send() {
var txt = "<font color='blue'>자식창에서 보낸 값</font>";
window.opener.document.myform.receiver.value = document.myform.sender.value;
window.opener.document.getElementById("process").innerHTML = txt;
window.close();
}
</script>
</head>
<form name="myform">
자식창 Sender : <input type="text" name="sender" size="10"><br>
자식창 Receiver : <input type="text" name="receiver" size="10"><span id="process"></span><br/>
<input type="button" value="받아오기" onclick="recieve()">
<input type="button" value="부모창에 데이터 보내고 닫기" onclick="send()"/>
</form>
</body>
</html>