ASP Charset 屬性
response 對象參考手冊Charset 屬性向 Response 對象中 content-type 頭部追加字符集名稱。
注釋:此屬性可接受任何字符串,不論是否為合法的字符集名稱。
語法:
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-1response 對象參考手冊