Este artigo descreve o método da página pop-up javascript para repassar os valores de volta. Compartilhe para sua referência. O método de implementação específico é o seguinte:
A1.html
Copie o código da seguinte forma: <!
<html>
<head>
<title> Janela 1 </title>
</head>
<Body>
<H1> Janela 1 </h1>
<Input type = "text" name = "a">
<Input type = "Button" OnClick = "Return test ();" >
<Cript>
function test () {
window.open ('b1.html', 'newwindow', 'altura = 100, largura = 400');
}
</script>
</Body>
</html>
b1.html
Copie o código da seguinte forma: <!
<html>
<head>
<Title> Novo documento </title>
</head>
<Body>
<H1> Janela 2 </h1>
<Input type = "text" name = "b" value = "11"> <input type = "submite" onclick = "return test ();">>
<Cript>
function test () {
var bValue = 111;
window.opener.A.Value = BValue;
window.close ();
}
</script>
</Body>
</html>
Espero que este artigo seja útil para a programação JavaScript de todos.