萬盛學電腦網

 萬盛學電腦網 >> 網絡編程 >> asp編程 >> asp html標簽轉換html編碼

asp html標簽轉換html編碼

Function Xszh(zh)
if zh<>"" or not isnull(zh) then
 zh=replace(zh,"  ","&nbsp;&nbsp;")
 zh=replace(zh,"&euro;","'")
 ''zh=replace(zh,chr(13),"<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=0 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

copyright © 萬盛學電腦網 all rights reserved