asp常用函数集合,非常不错以后研究第1/4页(6)
dim objRegEx,matches
set objRegEx = new RegExp
objRegEx.pattern = lcase(strattribute)&"=""[0-9a-zA-Z]*"""
objRegEx.ignorecase = true
objRegEx.global = true
set matches = objRegEx.execute(strtag)
if matches.count > 0 then
getattribute = split(matches(0).value,"""")(1)
else
getattribute = ""
end if
set matches = nothing
set objRegEx = nothing
end function
function getinnerhtml(byval strhtml)
dim objregex,matches,str
set objregex = new regexp
objregex.pattern = "(\])(.|\n)+?(\[\/ncms\])"
objregex.ignorecase = true
objregex.global = false
set matches = objregex.execute(strhtml)
if matches.count > 0 then
str = trim(matches.item(0).value)
end if
set matches = nothing
if len(str) > 8 then
getinnerhtml = mid(str,2,len(str) - 8)
end if
end function
function parsetag(byval strtag)
dim arrresult,classname,arrattributes,objclass
if len(strtag) = 0 then exit function
arrresult = split(strtag,":")
classname = split(arrresult(1)," ")(0)
select case lcase(classname)
case "news"
set objclass = new ncmsnewstag
if not isnumeric(getattribute("id",strtag)) then
response.write("标签[ncms:news]参数错误!参数[id]必须是数字!")
内容版权声明:除非注明,否则皆为本站原创文章。