长字符串/段落的省略函数是什么
fuyun
2008-11-19
前不久无意中看到ext中有这么一个方法,但多日没用,竟然给忘记了,当初也忘了作记录……汗了~
要实现的就是extjs帮助文档中对长字符串/段落进行截取,然后在末尾加上...省略号的功能。有哪位大侠能知道这个方法是什么? |
|
fuyun
2008-11-19
上帝啊~功夫不负苦心人呐~
废了n长时间,终于找到你了~~ 问题解决了~…… :P |
|
mercuryzhang
2008-11-21
说出来看看撒
|
|
atian25
2008-11-22
css: overflow:hidden; text-overflow: ellipsis;
|
|
gagapear
2008-11-22
强烈要求解决方法共享!呵呵
![]() |
|
fuyun
2008-11-24
呵呵~,刚把服务器关了,待明天上班之时,找到代码再公布~
谢谢了哈~!^_^ |
|
onlydo
2008-11-24
var xf = Ext.util.Format;
xf.ellipsis(xf.stripTags(record.data.content), 200) |
|
fuyun
2008-11-24
位于Ext.util.Format下的ellipsis方法。
ellipsis( String value, Number length ) : String Truncate a string and add an ellipsis ('...') to the end if it exceeds the specified length Parameters: value : String The string to truncate length : Number The maximum length to allow before truncating Returns: String The converted text |