可以这样写么?
<table cellSpacing="0" cellPadding="0" width="631" border="0">
<tr>
<td class="one" background="image/dot.jpg" height="25">
<p class="two">·<%=dr["title"]%></p>
</td>
</tr>
<tr>
<td align="center">
<%if(dr["photo"] != "")%>
<img src='../upload/<%=dr["photo"]%>'>
<%end if%>
</td>
</tr>
<tr>
<td class="one">
<%=dr["body"]%>
</td>
</tr>
</table>
我想通过判断dr["photo"]的值是否为空来决定是否显示<img> 可以这样写么? 或者还有什么更好的办法?