您的位置:程序门 -> web 开发 -> asp



请教.关于asp输出脚本.


[收藏此页] [打印本页]选择字色:背景色:字体:[][][]


请教.关于asp输出脚本.
发表于:2007-10-12 09:22:29 楼主
由于需要.

我要执行以下代码:

response.write(" <script> parent.topframe.location.reload(); </script> ")

response.redirect("default.asp")


页面为框架结构上框架名为topframe.主框架为mainframe.该程序在mainframe中执行.代码本意是让父框架的topframe刷新一下.然后mainframe跳转到default.asp

现在的问题是.他未执行完response.write(" <script> parent.topframe.location.reload(); </script> ")这句就开始执行response.redirect("default.asp")这个了.

如果我单执行response.write(" <script> parent.topframe.location.reload(); </script> ")这个是没有问题的.topframe可以刷新.

如何能让response.write(" <script> parent.topframe.location.reload(); </script> ")先执行完后执行跳转?
发表于:2007-10-12 09:51:301楼 得分:0
改为js控制转向

dim   script
script="parent.topframe.location.reload();   "
script=script&"function   reload(){"
script=script&"if(parent.topframe.document.readystate=='complete')window.location='default.asp';"
script=script&"   else   settimout('reload()',500);}"
script=script&"reload();"

response.write   script
发表于:2007-10-12 10:15:022楼 得分:0
response.write("   <script   > parent.topframe.location.reload();location.href='default.asp'   </script   > ")  
发表于:2007-10-12 10:17:013楼 得分:0
2楼的好
发表于:2007-10-12 11:29:214楼 得分:0
response.write("   <script> parent.topframe.location.reload();window.location=default.asp; </script> ")


快速检索

最新资讯
热门点击