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
SAT阅读练习题:Reading Comprehension Test 14Much of what goes by the name of pleasure is simply an effort to destroy consciousness. If one started by asking, what is man? what are his needs? how can he -
英语诗词: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英语四级作文
无论在学习、工作或是生活中,大家都跟作文打过交道吧,作文是由文字组成,经过人的思想考虑,通过语言组织来表达一个主题意义的文体。怎么写作文才能避免踩雷呢?以下是小编精心整理的手拉手作文,欢迎大家分享。手拉手作文1“ -
Passage Eighteen (Strictly Ban smoking)英语阅读理解
在日常学习、工作抑或是生活中,大家都写过作文,肯定对各类作文都很熟悉吧,作文是人们以书面形式表情达意的言语活动。那么,怎么去写作文呢?以下是小编为大家收集的发生在身边的故事作文,欢迎大家分享。发生在身边的故事作文