最新下载
热门教程
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
asp把html转换成html编码
时间:2022-06-30 09:14:25 编辑:袖梨 来源:一聚教程网
<%
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
select case mid(str,i,1)
case "<"
result=result+"<"
case ">"
result=result+">"
case chr(13)
result=result+"
"
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
%>
相关文章
- 免费看漫画软件哪个最好用-超流畅不卡顿的漫画app 12-26
- 囧次元app最新版本下载安装-囧次元动漫app官方正版下载 12-26
- 免费漫画平台大全-最全免费看漫画平台推荐 12-26
- 囧次元2025最新版安装包免费下载-囧次元动漫官网正版下载 12-26
- 抖漫动漫app最新版本下载安装-抖漫动画app免费下载正版 12-26
- 免费看短视频的app神器-轻松变身视频达人的必备软件推荐 12-26