最新下载
热门教程
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
asp html转成html编码程序
时间:2022-07-02 22:35:05 编辑:袖梨 来源:一聚教程网
asp html转成html编码程序
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(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
}
相关文章
- 《百炼英雄》大话西游联动英雄蜘蛛精·春十三娘培养建议 06-08
- 《三国冰河时代》S5赛季煮酒论英雄活动攻略 06-08
- 《炉石传说》32.2.4返场还愿快攻牧卡组码分享 06-08
- 比特币交易app十大排行 用户体验前十的比特币交易所 06-08
- 《潮汐守望者》幽影尖塔幽室2打法攻略 06-08
- 《潮汐守望者》幽影尖塔第10关打法攻略 06-08