程序師世界是廣大編程愛好者互助、分享、學習的平台,程序師世界有你更精彩!
首頁
編程語言
C語言|JAVA編程
Python編程
網頁編程
ASP編程|PHP編程
JSP編程
數據庫知識
MYSQL數據庫|SqlServer數據庫
Oracle數據庫|DB2數據庫
 程式師世界 >> 編程語言 >> 網頁編程 >> ASP編程 >> 關於ASP編程 >> asp html標簽轉換html編碼

asp html標簽轉換html編碼

編輯:關於ASP編程

    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

    1. 上一頁:
    2. 下一頁:
    Copyright © 程式師世界 All Rights Reserved