自强学堂
自强学堂:学习、分享、让你更强!
ASP 实例HTMLCSSJAVASCRIPTJQUERYSQLPHPBOOTSTRAPANGULARXML
 

ASP HTMLEncode 方法

Server 对象参考手册 完整的 Server 对象参考手册

HTMLEncode 方法对一段指定的字符串应用 HTML 编码。

语法

Server.HTMLEncode(string)

参数描述
string必需。要编码的字符串。

实例

脚本:

<%
response.write(Server.HTMLEncode("The image tag: <img>"))
%>

输出:

The image tag: &lt;img&gt;

Web 浏览器输出:

The image tag: <img>


Server 对象参考手册 完整的 Server 对象参考手册