asp____________请懂的帮我看看!先谢过!

来源:百度知道 编辑:UC知道 时间:2024/05/29 07:19:16
这个能正确的得到链接:
<%if rs("shangjiaid")>0 then
response.write "<a href=comtop.asp?id="&rs("shangjiaid")&">aaaaaaaaaa</a>"
end if%>
我想把上面的链接地址放在<iframe>里面
我写成这样:
<iframe src=comtop.asp?id=<% "&rs("shangjiaid")&" %> ></iframe>
出错了,请问应该怎么改?谢谢!

<iframe src="comtop.asp?id=<%=rs("shangjiaid")%>"></iframe>
记得有引号

同意二楼和三楼
完全的应该这样
<%if rs("shangjiaid")>0 then
response.write ("<iframe src=comtop.asp?id=")&rs("shangjiaid")&("></iframe>")
end if%>

<iframe src=comtop.asp?id=<%=rs("shangjiaid")%> ></iframe>