日期:2014-05-17  浏览次数:21222 次

急 怎样控制ASP循环输出字的长度
怎样控制ASP循环输出字的长度
如下“ZW”就是要输出的内容。要怎样控制ZW的长度呀

<%while   not   r6.eof
zw=   r6( "gw ")   %>
<%=zw%> /
<%r6.movenext
wend
r6.close
set   r6=nothing
%>

------解决方案--------------------
<%while not r6.eof
zw= r6( "gw ") %>
<%if len(zw)> 10 then response.write left(zw,10) & "...... " else response.write zw end if%> /
<%r6.movenext
wend
r6.close
set r6=nothing
%>