新建一文件articlechar.inc,其具体内容为: <% "Function程序是建立在子程序过程中的成组处理功能上的,是一个独立的程序用来接受自变量以执行一系列的代码语句,以及把处理好的代码语句的结直接返回给用户代码 function htmlencode2(str) dim result dim l if isNULL(str) then htmlencode2="" exit function end if l=len(str) result="" dim i for i = 1 to l "对返回的内容进行判定,并对其含有<,>,chr(13),chr(34),&,chr(32),chr(9)进行相应的转化,如chr(13)变为<br>;也就是回车的HTM代码 select case mid(str,i,1) case "<" result=result+"<" case ">" result=result+">" case chr(13) result=result+"<br>" case chr(34) result=result+""" case "&" result=result+"&" case chr(32) 'result=result+" " if i+1<=l and i-1>0 then if mid(str,i+1,1)=chr(32) or mid(str,i+1,1)=chr(9) or mid(str,i-1,1)=chr(32) or mid(str,i-1,1)=chr(9) then result=result+" " else result=result+" " end if else result=result+" " end if case chr(9) result=result+" " case else result=result+mid(str,i,1) end select next htmlencode2=result end function %>