求助框架页面刷新问题?

srljp 2005-07-03 09:39:24
我有一个框架页面,由top、left、main组成,left页面是向数据库写入数据,main页面是显示数据库数据,现在我想在点击left的页面提交按钮后对main页面刷新,应如何写asp程序。
...全文
472 16 打赏 收藏 转发到动态 举报
写回复
用AI写文章
16 条回复
切换为时间正序
请发表友善的回复…
发表回复
srljp 2005-07-04
  • 打赏
  • 举报
回复
_NET2004(.NET菜鸟):
谢谢!我的框架集页面文件名分别为:框架:test.asp,顶部:testtop.asp,左边:testleft.asp,主页面:testmain.asp,我要刷新的是主页面,'main'具体是那一个?
_NET2004 2005-07-04
  • 打赏
  • 举报
回复
main指的是框架的名称
srljp 2005-07-04
  • 打赏
  • 举报
回复
gamestar1(海洋之星) 、 LaoDai_Net(『老代』) 、ktgu(冰峰溪谷)、 nuliruyi(努力如意)、 _NET2004(.NET菜鸟)、 piaoliu(漂流):
我已试成功。非常成功!!!!!!!
piaoliu 2005-07-04
  • 打赏
  • 举报
回复
偶是菜鸟 表b4!
<!--test.html-->
<html>
<head>
</head>
<frameset rows="20%,*">
<frame src="testtop.asp" name="top">
<frameset cols="20%,*">
<frame src="testleft.html" name="left">
<frame src="testmain.html" name="main">
</frameset>
</frameset>
</html>
--------------------------------------------------------
<!--testleft.html-->
html>
<head>
</head>
<body>
<input type="button" onclick="javascript:parent.main.location.reload()">
</body>
</html>
----------------------------------
<!--testmain.html>
<html>
<head>
</head>
<body>
<script language="javascript">
alert();
</script>
</body>
</html>
<!--我试过了,没有问题,偶认为这个问题没有必要再讨论了……-->
--------------------------
老戴12345654 2005-07-03
  • 打赏
  • 举报
回复
<input type="button" value="做什么" onclick="javascript:window.parent.frames('main').location.reload();">

or

<a href='#' onclick="javascript:window.parent.frames('main').location.reload();">test</a>
srljp 2005-07-03
  • 打赏
  • 举报
回复
急!!!有谁帮我解决,解决后加分!!!!!
srljp 2005-07-03
  • 打赏
  • 举报
回复
nuliruyi(努力如意):
谢谢!我的框架集页面文件名分别为:框架:test.asp,top:testtop.asp,left:testleft.asp,main:testmain.asp则代码中main应该怎样写?
nuliruyi 2005-07-03
  • 打赏
  • 举报
回复
onclick="a()"
<script language=javascript>
function a(){
window.parent.frames('main').location.reload();"}
// 代码解释,A随便定义,是事件处理程序名。MAIN是你的框架名字,也就是HTML中FRAME的NAME属性
// 的值也可以写成如下
onclick="a()"
</script>
<script language=javascript>
function a(){
window.parent.main.location.reload();"}
// 按照以上方法应该没有问题了,如果还有问题你可以联系我,把详细代码给我,我的QQ是1634079
</script>
zol3334 2005-07-03
  • 打赏
  • 举报
回复
我买了一个 便宜的 asp.net空间!才50元!高兴!给分!!
100mb 的!可以做论坛!才 50元!!速度飞快!
www.hi876.com 你们看看
srljp 2005-07-03
  • 打赏
  • 举报
回复
我是新手请问 gamestar1(海洋之星) 该语句放在那里?能具体点吗?谢谢!
gamestar1 2005-07-03
  • 打赏
  • 举报
回复
window.parent.frames('main').location.reload();
srljp 2005-07-03
  • 打赏
  • 举报
回复
ktgu(冰峰溪谷):
不好意识,没试成功。我是新手请问该语句应放在哪?
srljp 2005-07-03
  • 打赏
  • 举报
回复
ktgu(冰峰溪谷):
Response.Write "<script language=javascript>window.parent.frames('main').location.reload();</script>"中'main'是网页文件名吗?
ktgu 2005-07-03
  • 打赏
  • 举报
回复
就在你处理好数据库插入成功以后添加以下代码:
Response.Write "<script language=javascript>window.parent.frames('main').location.reload();</script>"
应该可以
试试
srljp 2005-07-03
  • 打赏
  • 举报
回复
LaoDai_Net(『老代』) :
你提供的代码一直没试成功。
srljp 2005-07-03
  • 打赏
  • 举报
回复
LaoDai_Net(『老代』) 谢谢!但我已有一个提交按钮,我想在点击这个提交按钮后对main页面进行刷新,另外onclick="javascript:window.parent.frames('main').location.reload();"语句中('main')是否是main网页文件名,如main网页文件名为test.asp则该句是这样写吗onclick="javascript:window.parent.frames('test.asp').location.reload();"。还有我的网页是asp你提供语句支持吗?

28,406

社区成员

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

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