1个回答
展开全部
A.html
<html>
<head>
<script language="JavaScript">
function WinOpen() {
s= window.showModalDialog('b.html');
document.getElementById("s_Context1").innerText = s;
}
</script>
<form>
<input type="button" name="Button1" value="打开新窗口" onclick="WinOpen()">
result:<input id="s_Context1" type="text">
</form>
</head>
<body>
</body>
</html>
B.html
<html>
<head>
<script language="JavaScript">
function Winclose(a) {
alert(a);
window.returnValue = a;
window.close();
}
</script>
<form>
输入<input id="txt_Context" type="text">
<input type="button" name="Button1" value="back" onclick="Winclose(txt_Context.value)">
</form>
</head>
<body>
</body>
</html>
<html>
<head>
<script language="JavaScript">
function WinOpen() {
s= window.showModalDialog('b.html');
document.getElementById("s_Context1").innerText = s;
}
</script>
<form>
<input type="button" name="Button1" value="打开新窗口" onclick="WinOpen()">
result:<input id="s_Context1" type="text">
</form>
</head>
<body>
</body>
</html>
B.html
<html>
<head>
<script language="JavaScript">
function Winclose(a) {
alert(a);
window.returnValue = a;
window.close();
}
</script>
<form>
输入<input id="txt_Context" type="text">
<input type="button" name="Button1" value="back" onclick="Winclose(txt_Context.value)">
</form>
</head>
<body>
</body>
</html>
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询