62,255
社区成员
发帖
与我相关
我的任务
分享
int num=30
string content = FCKeditor1.Value;
content = Regex.Replace(content, "<[^>]+>", "");
if (content.Length > num)
{
content = content.Substring(0, num) + "......";
}
return content;
//这个可以所有去掉HTML标签
string str = FCKeditor1.Value;
str = System.Text.RegularExpressions.Regex.Replace(str, "<.*?>", "");
Response.Write(str);
//str 就是已经去掉格式后纯文本了
//然后你可以判断长度,看怎么截取