Charset

收藏:0   阅读:18

ASP Charset 属性


Charset 属性向 Response 对象中 content-type 头部追加字符集名称。默认字符集是 ISO-LATIN-1。

注意:此属性可接受任何字符串,不论是否为合法的字符集名称。

语法

response.Charset(charsetname)

参数 描述
charsetname 为页面规定字符集的字符串。

实例

如果 ASP 页面没有设置 Charset 属性,那么 content-type 头部会是这样的:

content-type:text/html

如果我们使用了 Charset 属性:

<%response.Charset="ISO-8859-1"%>

content-type 头部会是这样的:

content-type:text/html; charset=ISO-8859-1
© 2014 bubuko.com 版权所有 - 联系我们:wmxa8@hotmail.com
打开技术之扣,分享程序人生!