dreamweaver cs3 图文教程之创建博客blog程序(五)
- 2021-12-24
- 来源/作者: 呆呆 / 呆呆
- 2 次浏览
新建服务器行为,当然,直接加入代码也可以了。
<%
function delhtmltags(htmlstr)
dim regEx
Set regEx = New RegExp
regEx.Pattern = "<.*?>"
regEx.Global = True
regEx.IgnoreCase = True
delhtmltags= regEx.Replace(htmlstr,"")
end function
function trunc(cnt)
cnt=delhtmltags(cnt)
trunc=left(cnt,300)
end function
%>
'注:以上没有更多的考虑格式上的问题,日后再说。
服务器行为建好后,以后随时都可以用,提高代码的重复利用率。