NetBox 2.7 使用手册

HTMLEncode 方法

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

语法

Server.HTMLEncode(string )
 

参数

string
指定要编码的字符串

示例

下面的脚本程序

<%= Server.HTMLEncode("The paragraph tag: <P>")%> 

将输出下面的文字

The paragraph tag: &lt;P&gt;

经过浏览器自动解码,将现实下面的现实内容

The paragraph tag: <P>

如果你使用 View Source 察看页面的代码,将看到经过编码的文本。

应用于

Server 对象
版权所有: 2003- 网络盒子