<%
'●返回特定长度的字符串
function LenString(txt,length)
txt=trim(txt)
x = len(txt)
y = 0
if x >= 1 then
for ii = 1 to x
if asc(mid(txt,ii,1)) < 0 or asc(mid(txt,ii,1)) >255 then '如果是汉字
y = y + 2
else
y = y + 1
end if
if y >= length then 
txt = left(trim(txt),ii-1) & ".." '字符串限长
exit for
end if
next
LenString = txt
else
LenString = ""
end if
end function 
function softwarename(msgs)
if len(msgs) > 10 then
softwarename=mid(msgs,1,5) & "..."
else
softwarename=msgs
end if
end function
%>