请问,如何在网页中点击按纽之后弹出一个页面,在里面操作之后可以取得数据并在原来的页面上的表单中附值。

adow 2004-08-24 02:14:29
rt
...全文
182 7 打赏 收藏 转发到动态 举报
写回复
用AI写文章
7 条回复
切换为时间正序
请发表友善的回复…
发表回复
sheng9hhd 2004-08-24
  • 打赏
  • 举报
回复
opener
mjpclab 2004-08-24
  • 打赏
  • 举报
回复
弹出窗口:
<form ... onsubmit="{opener.form1.text1.value=form1.text1.value; ..依此类推..}">
jianxin0560 2004-08-24
  • 打赏
  • 举报
回复
简单的写了写 ,在我这了可以实现,不知道和你的要求是不是一样,可以看看。
jianxin0560 2004-08-24
  • 打赏
  • 举报
回复
可以用iframe
首先在底页设置iframe成隐藏状态,通过事件现实iframe,操作后用pareat.赋值
大致结构如下:
主页:par.html
<!doctype html public "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title> New Document </title>
<meta name="Generator" content="EditPlus">
<meta name="Author" content="">
<meta name="Keywords" content="">
<meta name="Description" content="">
</head>
<script language="JavaScript">
<!--
function showchild(){
//alert("ok")
self.document.all.fSrhProj.style.visibility="visible";
self.document.all.fSrhProj.style.left=screen.width/6;
self.document.all.fSrhProj.style.top=screen.height/6;
self.fSrhProj.document.location.href="child.html";
}
//-->
</script>
<body>
<form name="pf1" >
<input type="text" name="p1" value="">
<input type="button" name=b1 value="显示" onclick=showchild()>
</form>
<iframe border="0" frameborder="1" id="fSrhProj" name="fSrhProj" onblur="this.style.visibility='hidden';" style="z-index:9;position:absolute;visibility:hidden;HEIGHT:200; WIDTH:450;left:300;top:300;border: 2px solid #3399FF;" scrolling="no">
</iframe>
</body>
</html>
弹出页 :child.html
<!doctype html public "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title> New Document </title>
<meta name="Generator" content="EditPlus">
<meta name="Author" content="">
<meta name="Keywords" content="">
<meta name="Description" content="">
</head>
<script language="JavaScript">
<!--
function setit(){
//alert("01")
parent.document.all.pf1.p1.value=document.all.fc1.child.value;
//alert("02")
parent.document.all.fSrhProj.style.visibility='hidden';
//alert("03")
}
</script>

<body>
<form name=fc1>
<input type="text" name="child" value="" >
<input type="button" name=b2 value="关闭" onclick=setit()>
</form>
</body>
</html>
Felix_csdn 2004-08-24
  • 打赏
  • 举报
回复
实现同步刷新吗?

也想知道答案
mind_1220 2004-08-24
  • 打赏
  • 举报
回复
你是可以获得 浏览器(当前正在浏览的那个页面)ID的
用这个ID来负值
具体的我没有做过。
  • 打赏
  • 举报
回复
刚研究了一下,如同263一样,是多了一个页面后,submit的时候是多了个无闪刷新

28,391

社区成员

发帖
与我相关
我的任务
社区描述
ASP即Active Server Pages,是Microsoft公司开发的服务器端脚本环境。
社区管理员
  • ASP
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧