gpt4 book ai didi

jquery - 我收到 JSON 的 XML 错误消息?

转载 作者:行者123 更新时间:2023-12-01 01:04:18 30 4
gpt4 key购买 nike

更新2:

我没有提到我在 Chromium 中没有收到以下错误,但在 IE8 中却收到了它。

更新1:

Response Headers:
HTTP/1.1 200 OK
Date: Fri, 20 May 2011 15:40:23 GMT
Server: Microsoft-IIS/6.0
X-Powered-By: ASP.NET
X-AspNet-Version: 2.0.50727
Cache-Control: private
Content-Type: application/json; charset=utf-8
Content-Length: 85

原始问题:

我有一个生成 json 数据的服务器端页面,当通过 jquery 访问时效果非常好。但是,当我导航到实际生成 json 数据的网页时,我在浏览器中收到以下客户端错误消息:

The XML page cannot be displayed 
Cannot view XML input using style sheet. Please correct the error and then click the Refresh button, or try again later.


--------------------------------------------------------------------------------

Invalid at the top level of the document. Error processing resource 'http://companyname.com/json/data.aspx?id=7

[{"key":7,"value":"Default"}]

为什么会发生这种情况以及如何阻止错误消息的出现?

最佳答案

同样的问题,context.Response.ContentType="text/plain";
让我很开心...

关于jquery - 我收到 JSON 的 XML 错误消息?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6070465/

30 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com