当前位置: 首页 > 网络学院 > 服务端脚本教程 > ASP > ASP HTMLEncode 方法

ASP
ASP Drive
ASP File
ASP Folder
ASP Dictionary
ASP ADO
ASP AdRotator
ASP BrowserCap
ASP Content Linking
ASP Content Rotator
ASP Quick Ref
ASP 摘要
ASP 实例

ASP HTMLEncode 方法


出处:互联网   整理: 软晨网(RuanChen.com)   发布: 2009-03-04   浏览: 403 ::
收藏到网摘: n/a

The HTMLEncode method applies HTML encoding to a specified string.
HTMLEncode方法的作用是将HTML代码转换为相应的字符串编码。

Syntax
语法

Server.HTMLEncode(string) 

Parameter
参数
Description
描述
string Required. The string to encode
必要参数。输出转换编码的字符串

Example
举例

The following script:

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

Output:

The image tag: &lt;img&gt;

Web browser output:

The image tag: <img>

评论 (0) All

登陆 | 还没注册?