이 기사에서는 JavaScript 팝업 페이지가 값을 전달하는 방법을 설명합니다. 참조를 위해 공유하십시오. 특정 구현 방법은 다음과 같습니다.
a1.html
다음과 같이 코드를 복사하십시오. <! doctype html public "-// w3c // dtd html 4.0 Transitional // en">
<html>
<헤드>
<title> 창 1 </title>
</head>
<body>
<H1> 창 1 </h1>
<입력 유형 = "텍스트"이름 = "a">
<input type = "button"onclick = "return test ();" >
<cript>
기능 test () {
window.open ( 'b1.html', 'newwindow', 'height = 100, 너비 = 400');
}
</스크립트>
</body>
</html>
B1.html
다음과 같이 코드를 복사하십시오. <! doctype html public "-// w3c // dtd html 4.0 Transitional // en">
<html>
<헤드>
<title> 새로운 문서 </title>
</head>
<body>
<H1> 창 2 </h1>
<입력 유형 = "text"name = "b"value = "11"> <입력 유형 = "제출"onclick = "return test ();">
<cript>
기능 test () {
var bvalue = 111;
Window.opener.a.value = bvalue;
Window.Close ();
}
</스크립트>
</body>
</html>
이 기사가 모든 사람의 JavaScript 프로그래밍에 도움이되기를 바랍니다.