紧急求助一个ASP的代码~

来源:百度知道 编辑:UC知道 时间:2024/06/20 14:14:03
就是如果A的值等于空,<table><tr><td>好</tr></td></table>
这个表格不显示
如果A的值不为空就显示这个表格
这个代码要怎么写?
A是我从数据库里取出来的值~

不管你的a怎么来的,都可以用这个表达式。
你只要把数据库里取出来的值赋给a就可以了,比如:
a=rs("a")
=======================
<%
if a<>"" then
response.write "<table><tr><td>好</tr></td></table>"
end if
%>

楼上是正解
要先给a赋一个值,如
<%
a=1
if a<>"" then
response.write "<table><tr><td>好</tr></td></table>"
end if
%>