新闻中限制显示字数目
生活随笔
收集整理的这篇文章主要介绍了
新闻中限制显示字数目
小编觉得挺不错的,现在分享给大家,帮大家做个参考.
这个用在里面限制字体个数的东西:
Dim rsTitle,tmpLeft
rsTitle=Rs("Title")
If Len(rsTitle)>intTitLen Then
????rsLeft=rsTitle
????Do While Len(rsLeft)>intTitLen 'Or Len(Right(rsTitle,intTitLen*j))>intTitLen
?????Response.Write Left(rsLeft,intTitLen)&"
"
?????rsLeft=Right(rsLeft,Len(rsLeft)-intTitLen)
????Loop
????If Not IsNull(rsLeft) Then
?????Response.Write rsLeft
????End If
???Else
????Response.Write rsTitle
???End If
这个市临时写得,写得比较差!谁要是有好的,别忘记交流阿!
总结
以上是生活随笔为你收集整理的新闻中限制显示字数目的全部内容,希望文章能够帮你解决所遇到的问题。
- 上一篇: C/C++基础语法复习(二):C++ 面
- 下一篇: 数据实体层介绍