熱點推薦:
您现在的位置: 電腦知識網 >> 編程 >> .NET編程 >> 正文

asp html標簽轉換html編碼

2013-11-13 10:43:02  來源: .NET編程 

  Function Xszh(zh)
if zh<>"" or not isnull(zh) then
 zh=replace(zh"  ""&nbsp;&nbsp;")
 zh=replace(zh"&euro;""")
 zh=replace(zhchr()"<br>")
 zh=lcase(zh)
 zh=replace(zh"<table""&lt;table")
 zh=replace(zh"<hr>""&lt;hr&gt;")
 zh=replace(zh"<tr""&lt;tr")
 zh=replace(zh"<%""&lt;%")
 zh=replace(zh"<html>""&lt;html&gt;")
 zh=replace(zh"<body""&lt;body")
 zh=replace(zh"<div""&lt;div")
 zh=replace(zh"<iframe ""&lt;iframe")
 zh=replace(zh"</iframe> ""&lt;iframe&gt;")
 zh=replace(zh"</html>""&lt;/html&gt;")
 zh=replace(zh"<OBJECT""&lt;object")
 zh=replace(zh"<object""&lt;object")
 zh=replace(zh"</div>""&lt;/div&gt;")
 zh=replace(zh"<span""&lt;span")
 zh=replace(zh"<script""&lt;script")
 zh=replace(zh"<td""&lt;td")
 zh=replace(zh"</table>""&lt;/table&gt;")
 zh=replace(zh"<title>""&lt;title&gt;")
 zh=replace(zh"</title>""&lt;/title&gt;")
 zh=replace(zh"</body>""&lt;/body&gt;")
 zh=replace(zh"<input""&lt;input")
 zh=replace(zh"<!doctype""&lt;doctype")
 zh=replace(zh"</tr>""&lt;/tr&gt;")
 zh=replace(zh"</td>""&lt;/td&gt;")
 zh=replace(zh"<img""&lt;img")
 zh=replace(zh"[img]""<img border= src=")
 zh=replace(zh"[/img]"">")
 zh=replace(zh"<text""&lt;text")
 zh=replace(zh"<java""&lt;java")
 zh=replace(zh"<a ""<a target=_blank ")
 zh=replace(zh"</javascript>""&lt;/javascript&gt;")
 zh=replace(zh"[url=""<a target=_blank href=")
 zh=replace(zh"[/url]""</a>")
 xszh = zh
end if
End Function


From:http://tw.wingwit.com/Article/program/net/201311/14362.html
    推薦文章
    Copyright © 2005-2013 電腦知識網 Computer Knowledge   All rights reserved.