展会信息港展会大全

asp ubb代码转换成html代码
来源:互联网   发布日期:2016-03-01 11:05:21   浏览:2346次  

导读:Function Ubb2Html(str, showemot, showimg) ON ERROR RESUME NEXT if Not str then exit function tmpstr=uNobwab str=UbbStr(str,url) str=UbbStr(str,quote) str=UbbStr(str,color) str=UbbStr(str,size) str=UbbStr(str,face) if showemot then for i=1...

Function Ubb2Html(str, showemot, showimg)

ON ERROR RESUME NEXT

if Not str<>"" then exit function

tmpstr="uNobwab"

str=UbbStr(str,"url")

str=UbbStr(str,"quote")

str=UbbStr(str,"color")

str=UbbStr(str,"size")

str=UbbStr(str,"face")

if showemot then

for i=1 to 16

str=replace(str,":em"&i&":","<img src='emot/em"&i&".gif'>",1,6,1)

str=replace(str,":em"&i&":","",1,-1,1)

next

End if

if showimg then

str=UbbStr(str,"img")

str=UbbStr(str,"swf")

str=UbbStr(str,"dir")

str=UbbStr(str,"rm")

str=UbbStr(str,"mp")

str=UbbStr(str,"qt")

End if

str=UbbStr(str,"frame")

str=replace(str,"[b]","<b>",1,-1,1)

str=replace(str,"[/b]","</b>",1,-1,1)

str=replace(str,"[u]","<u>",1,-1,1)

str=replace(str,"[/u]","</u>",1,-1,1)

str=replace(str,"[br]","<br>",1,-1,1)

str=replace(str,"[center]","<center>",1,-1,1)

str=replace(str,"[/center]","</center>",1,-1,1)

str=replace(str,"[fly]","<marquee>",1,-1,1)

str=replace(str,"[/fly]","</marquee>",1,-1,1)

str=replace(str,"["&tmpstr,"[",1,-1,1)

str=replace(str,tmpstr&"]","]",1,-1,1)

str=replace(str,"/"&tmpstr,"/",1,-1,1)

Ubb2Html=str

End Function

赞助本站

人工智能实验室

相关热词: 开发 编程 android

AiLab云推荐
展开

热门栏目HotCates

Copyright © 2010-2024 AiLab Team. 人工智能实验室 版权所有    关于我们 | 联系我们 | 广告服务 | 公司动态 | 免责声明 | 隐私条款 | 工作机会 | 展会港