html5中文学习网

您的位置: 首页 > 网络编程 > ASP编程 » 正文

ASP实现新闻中限制显示字数目_ASP教程_编程技术

[ ] 已经帮助:人解决问题
显示

这个用在里面限制字体个数的东西:

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

这个市临时写得,写得比较差!谁要是有好的,别忘记交流阿!

jXbHTML5中文学习网 - HTML5先行者学习网
jXbHTML5中文学习网 - HTML5先行者学习网
(责任编辑:)
推荐书籍
推荐资讯
关于HTML5先行者 - 联系我们 - 广告服务 - 友情链接 - 网站地图 - 版权声明 - 人才招聘 - 帮助