ASP Charset 屬性
❮ 完整的 Response 物件參考
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
❮ 完整的 Response 物件參考