⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 cut.asp

📁 这次自已做的美工,可能很难看,但主要是为提高效率,这次全部生成了静态,只有一个链接查看最新文章的列表没有生成,因为我觉得没必要生成,浪费空间大小,那是一个很少用到的功能!这次去掉了很多功能,这个版本主
💻 ASP
字号:
<%
'--------------cut为字母为2,汉字为1的count
function cut(str,count1)
count1=cint(count1)
for j=1 to len(str)
s=mid(str,j,1)
if asc(s)<255 and asc(s)>0 then
count1=count1-1
else
count1=count1-2
end if
if count1<=0 then
cut=mid(str,1,j)
exit function
end if
next
if count1>=0 then
cut=str
end if
end function
function d_cut(str,num,type1)
dim start_i,end_i
start_i=instr(str,"<span")
if start_i<>0 then
end_i=instr(start_i+5,str,">")
if end_i<>0 then
dim spanstr
spanstr=left(str,end_i)
start_i=instr(end_i+1,str,"</span>")
if start_i<>0 then
title=mid(str,end_i+1,start_i-end_i-1)
if type1=1 then
d_cut=title
exit function
end if
title=cut(title,num)
else
title=mid(str,end_i+1)
end if
d_cut=spanstr&title&"</span>"
end if
else
if type1=0 then
d_cut=cut(str,num)
else
d_cut=str
end if
end if
end function
%>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -