Asp Response.CharSet解決方法
Microsoft VBScript runtime error 800a01b6
Object doesnt support this property or method: set
檢查出錯代碼:
Set = "GB2312"
這行代碼主要是為了解決ajax用get獲得數據時,中文亂碼的問題。
刪除這行代碼後netbox正常運行,但是ajax返回的中文數據成了亂碼。
説明 NetBox不支持 Set 。
打開netbox的使用手冊,依次展開:
對象參考 → Response 對象 → Response 方法
AddHeader 方法
AddHeader 方法用指定的'值添加 HTML 標題。該方法常常向響應添加新的 HTTP 標題
語法
eader name, value
參數
name
新的標題變量的名稱
value
存儲在新的標題變量中的初始值
註釋
為避免命名不明確,name 中不能包含任何下劃線字符 (_)。ServerVariables 集合將標題中的下劃線字符解釋為反斜槓。例如,下面的腳本使服務器查找一個名為 MY-HEADER 的標題名。
示例
下面這個示例使用 AddHeader 方法要求客户端使用 BASIC 驗證。
注意 前面的腳本僅通知客户端瀏覽器使用哪個驗證。若您在 Web 應用程序中使用該腳本,則一定要啟用 Web 服務器的 BASIC 驗證。
於是將
Set = "GB2312"
替換成:
eader "Content-Type","text/html; charset=gb2312"
NetBox環境下ajax用get獲取數據,中文亂碼的問題解決!
相關文章
-
關於 response方法的javascript asp教程第六課
response 對象:reponse是asp中六個對象之一。它代表了服務器端對瀏覽器的迴應。response有8種方法,9種屬性和一個集。在這一課,我們就重點講述方法。方法:在javascript中,asp方法使用括號。請注意依賴er的兩個方法,我們將在 -
Is a Test of Spoken English Necessary英語四級作文
A test of spoken English will be included as an optional component of College English Test . Some people argue that it is absolutely necessary to hold a test of spoken English in China because we have -
人物性格分析 The Analysis of Personal Character英語作文
在學習、工作或生活中,大家對作文都再熟悉不過了吧,藉助作文人們可以實現文化交流的目的。相信許多人會覺得作文很難寫吧,下面是小編精心整理的.人物性格分析 The Analysis of Personal Character英語作文,歡迎大家分享。 -
MS SQL Server Management Studio Express安裝圖文具體步驟
Microsoft sql server Management Studio Express (SSMSE) 是一種免費、易用的圖形管理工具,用於管理 SQL Server 2005 Express Edition 和具有高級服務的 SQL Server 2005 Express Edition。SSMSE 還可以管理任何版本 -
MySQL安裝時出現current root password的解決方法
總結出以下解決方法:1.清除MYSQL的`安裝目錄,默認是C:Program Files2.清除MYSQL數據存放目錄,一般在C:Documents and SettingsAll owsApplication Data目錄下(需要注意的時Application Data這個文件夾默認是隱藏的,要通過 -
分享SAT閲讀練習題:Reading Comprehension Test 14
諱諛【意思解釋】1.隱諱不言和阿諛諂媚。 -
英語詩詞:Passerby These are Words
Passerby, These are Wordsby Yves Bonnefoy Translated by Hoyt RogersPasserby, these are words. But instead of reading I want you to listen: to this frail Voice like that of letters eaten by grass.Lend an -
公共英語二級寫作Preserving Natural Resources
Through the changes in the ways of making a living in a family over several generations, the cartoon aims at sounding a waing against mans wasteful use of natural resources and emphasizing the urgent -
Choice of large enterprises or small英語四級作文
just as there are distinct differences between being a small fish is a big pond and a big fish in a small pond, so it is with working as a subordinate in a large enterprise and presiding in a small fi -
Passage Eighteen (Strictly Ban smoking)英語閲讀理解
在日常學習、工作抑或是生活中,大家都寫過作文,肯定對各類作文都很熟悉吧,作文是人們以書面形式表情達意的言語活動。那麼,怎麼去寫作文呢?以下是小編為大家收集的發生在身邊的故事作文,歡迎大家分享。發生在身邊的故事作文