ASP程序,如何限定显示的字符数?限制80个字符
<%setrs0=server.createobject("adodb.recordset")ifrequest("id")<>""thensql0="select*fr...
<%
set rs0=server.createobject("adodb.recordset")
if request("id")<>"" then
sql0="select * from news where id="&cstr(request("id"))
else
sql0="select * from news where cataid =35 "
end if
rs0.open sql0,conn,1,1
if rs0.eof and rs0.bof then
response.write "<script>alert('对不起,该信息并不存在!');</Script>"
response.end
else
content=rs0("content")
end if
%>
<tr>
<td><font color="#000000" style="line-height:15pt"><%=content%></font></td>
</tr>
<%
set rs=Nothing
%> 展开
set rs0=server.createobject("adodb.recordset")
if request("id")<>"" then
sql0="select * from news where id="&cstr(request("id"))
else
sql0="select * from news where cataid =35 "
end if
rs0.open sql0,conn,1,1
if rs0.eof and rs0.bof then
response.write "<script>alert('对不起,该信息并不存在!');</Script>"
response.end
else
content=rs0("content")
end if
%>
<tr>
<td><font color="#000000" style="line-height:15pt"><%=content%></font></td>
</tr>
<%
set rs=Nothing
%> 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询