如何将response.write后面获得的地址,插入超链接

来源:百度知道 编辑:UC知道 时间:2024/05/29 15:20:23
如何将response.write后面获得的地址,插入超链接

下面这代码运行后会得到一个地址,例如http://3gp.bbc7.cn/64647.rar
<%
dim rs
dim id
id=Request.QueryString("id")
if isnumeric(id)=0 or id="" then
response.write "非法ID参数"
response.end
end if
Set rs= Server.CreateObject("ADODB.Recordset")
rs.open "update web set click=click+1 where id="&id,conn,1,3
set rs=Nothing
set rs=conn.execute("select id,url from web where id="&id)
response.write ""&rs("url")&""
rs.close
set rs=Nothing
conn.close
set conn=nothing
%>

如何把上面代码获得的地址插入下面超链接中

<a href="此处就是上面获得的地址">下载地址</a>

要求都在同一页面完成上面官能

<%
dim rs
dim id
id=Request.QueryString("id")
if isnumeric(id)=0 or id="" then
response.write "非法ID参数"
response.end
end if
Set rs= Server.CreateObject("ADODB.Recordset")
rs.open "update web set click=click+1 where id="&id,conn,1,3
set rs=Nothing
set rs=conn.execute("select id,url from web where id="&id)
%>
<a href="<% rs("url") %>">下载地址</a>
<%
rs.close
set rs=Nothing
conn.close
set conn=nothing
%>