ASP常用函数:HTMLDecode
程序员文章站
2023-12-04 18:14:40
<% function htmldecode(stext) dim i &...
<%
function htmldecode(stext)
dim i
stext = replace(stext, "&" , chr(38))
stext = replace(stext, """", chr(34))
stext = replace(stext, "<" , chr(60))
stext = replace(stext, ">" , chr(62))
stext = replace(stext, " ", chr(32))
for i = 1 to 255
stext = replace(stext, "" & i & ";", chr(i))
next
htmldecode = stext
end function
%>
function htmldecode(stext)
dim i
stext = replace(stext, "&" , chr(38))
stext = replace(stext, """", chr(34))
stext = replace(stext, "<" , chr(60))
stext = replace(stext, ">" , chr(62))
stext = replace(stext, " ", chr(32))
for i = 1 to 255
stext = replace(stext, "" & i & ";", chr(i))
next
htmldecode = stext
end function
%>
上一篇: 个人网站运营故事经验分享
下一篇: 如何将长的标题用省略号收尾