ASP HTMLEncode 方法
HTMLEncode 方法對(duì)一段指定的字符串應(yīng)用 HTML 編碼。
語法
Server.HTMLEncode(string)
參數(shù) | 描述 |
string | 必需。要編碼的字符串。 |
實(shí)例
腳本:
<%
response.write(Server.HTMLEncode("The image tag: <img>"))
%>
輸出:
The image tag: <img>
Web 瀏覽器輸出:
The image tag: <img>