response.redirect "../"&path&"/"&filename ////这里如何在新窗口中显示?
%>
==>
%>
<script>window.open("../<%=path%>/<%=filename%>","");</script>
%>
==>
%>
<script>window.open("../<%=path%>/<%=filename%>","");</script>
解决方案 »
- Javascript中.length问题
- 文件上传,设置input file 的value,有什么好的解决方案?
- 求一个功能的做法~谢谢
- 关于Ext在IE7下button高度的问题!!急!!在线等
- 求助;静态页面用js获取url参数,并记录cookies
- 怎么样让iframe背景透明
- 有没有做WEB前台开发的朋友
- ******谁知道用javascript实现IE中右键"目标保存为功能"******
- 关于 attachEvent 的一个问题
- 判断是否为字母,或者数字的函数是什么?
- 为什么我在动态增加的TR上附加onKeyDown事件总是不成功?请大侠看看!
- 关于网页中插入MediaPlayer控件的一个问题.
我这样做了后,是在新窗口中显示内容了,但原网页内容了一个大空白上一个“%〉”
rs.close
conn.close
%>
<script>window.open("../<%=path%>/<%=filename%>","","");</script>注意不要把%>写到<script>标签后面
<!--#include file="articleconn.asp"-->
<%response.buffer=false
dim sql
dim path
dim filename
dim rs
dim listname
dim articleidarticleid=request("id")
path=request("path")
session("path1")=path
filename=request("filename")
set rs=server.createobject("adodb.recordset")
sql="update article set hits=hits+1 where newsID="&articleid
rs.open sql,conn,1,1
rs.close
conn.close
%>
<script>window.open("../<%=path%>/<%=filename%>","");</script>
<a href="javascript:void(0)" onclick="window.open('redirect.asp','','')">open</a>
<style>A.menu2{text-decoration: none;color:#000099;line-height: 25pt;font-size:9pt} A.menu2:hover {text-decoration: none;line-height: 25pt;font-size:9pt;color: #ffffff}A.menu2:visited {color:#FF66cFF;line-height: 25pt;font-size:9pt}</style>
</head>javastr=""
javastr=javastr+"<table width=\"100%\" border=\"0\">"
<!--#include file="articleconn.asp"-->
<%newstype=request("typeid")
n=request("n")
if newstype<> "" then
sql="select * from article where shenghe=1 and typeid="+cstr(newstype)+" order by dateandtime desc"
set rs=conn.execute(sql)%>
<%
do while not rs.eof
%>
javastr=javastr+"<tr><td>"
javastr=javastr+"<font color=\"#597BC3\" size=\"1\">.</font><span style=\"font-size:9pt;line-height: 15pt\"><%if rs("selectpic") = 1 then%>[图文]<%end if%><a href=\"open.asp?id=<%=rs("newsid")%>&path=<%=rs("path")%>&filename=<%=rs("N_Fname")%>\") ><%=rs("title")%></span></a><font color=\"#999999\" font size=\"1\">(<%=rs("dateandtime")%>)(阅读:<%=rs("hits")%>)</font>"
javastr=javastr+"</td></tr>"
<%n=n-1
if n<1 then exit do
rs.movenext
loop
rs.close
set rs=nothing
conn.close
set conn=nothing%>
javastr=javastr+"</table>"
document.write (javastr)
<%else%>
document.write ("对不起,暂时没有任何内容。")
<%end if%>
<%
dim newsid
dim path
dim N_Fname
dim title
newsid="news18"
path="sub"
N_Fname="welcome.htm"
title="open"
%>
<script>
javastr="";
//javastr=javastr+"<a href=\"open.asp?id=<%=newsid%>&path=<%=path%>&filename=<%=N_Fname%>\"><%=title%></a>";//这是你原来的代码
javastr=javastr+"<a href=\"javascript:void(0)\" onclick=\"window.open('open.asp?id=<%=newsid%>&path=<%=path%>&filename=<%=N_Fname%>','','')\"><%=title%></a>";//改成这样
document.write(javastr);
</script> open.asp
<%response.buffer=false
dim sql
dim path
dim filename
dim rs
dim listname
dim articleidarticleid=request("id")
path=request("path")
filename=request("filename")
response.redirect "../"&path&"/"&filename
%>