如下:
.
.
1 =rs("title")
.
.
上面这样的话,要把title中所有的字符都显示出来。
如果我只想显示title这个字节中的前10个字符,如何办?
也就是若title中有5个字符,则5个字符全显示出来;如果title中有15个字符,则只显示前10个字符,然后后面出现省略号。
(不知道我表达的清楚不清楚,大家帮我解决下这个问题吧,谢谢!)
---------------------------------------------------------------
1
2if len(trim(rs("title")))=5 then
3response.write rs("title")
4elseif len(trim(rs("title")))=15 then
5response.write left(rs("title"),10)
---------------------------------------------------------------
1
2if length(rs("title"))<=10 then
3response.write rs("title")
4else
5response.write left(rs("title"),10)&"..."
6end if