jquery 1.5 ajax请求是错误的

尝试升级到jQuery 1.5并且所有的ajax调用都会中断。 我正在运行firefox并且它给了我一个无效标签的javescript错误我正在使用php的json_encode这里是我的json响应

{ "page": "1", "total": 9651, "rows": [ { "cell": [ "story", "51438", "Skin color: Handy tool for teaching evolution", "2011-02-20 08:30:26" ] }, { "cell": [ "story", "51435", "Photosynthesis may hold key to production of cheap hydrogen for fuel", "2011-02-19 10:00:03" ] }, { "cell": [ "story", "51478", "Dancers, supporters ready for THON 2011 Feb. 18-20 at Jordan Center", "2011-02-18 14:26:25" ] }, { "cell": [ "story", "51420", "Juggling languages can build better brains", "2011-02-18 13:30:44" ] }, { "cell": [ "story", "51434", "Multiple approaches necessary to tackle world's food problems", "2011-02-18 13:30:44" ] }, { "cell": [ "story", "51436", "US will no longer dominate science and research, study finds", "2011-02-18 13:00:49" ] }, { "cell": [ "story", "51492", "NPR to air interview with Penn State professor today (Feb. 18)", "2011-02-18 11:20:10" ] }, { "cell": [ "story", "51437", "Research universities play a major role in national security", "2011-02-18 10:30:28" ] }, { "cell": [ "story", "51472", "Paterno's necktie from 400th win nets $10,200 for Public Broadcasting", "2011-02-18 09:20:52" ] }, { "cell": [ "story", "51363", "PSU Extension offers free tax preparation help for low-income families", "2011-02-18 01:32:04" ] }, { "cell": [ "story", "51477", "Students set to produce complete THON coverage, including webcast", "2011-02-17 15:24:47" ] }, { "cell": [ "story", "51385", "The Medical Minute: Seasonal Affective Disorder", "2011-02-17 12:27:30" ] }, { "cell": [ "story", "51345", "Abington professor's new book exposes NBA betting scandal", "2011-02-17 11:59:31" ] }, { "cell": [ "story", "51360", "Student Stories: Statistical service internship makes it all add up", "2011-02-17 11:12:32" ] }, { "cell": [ "story", "51453", "Parking Office announces parking, transit changes related to THON", "2011-02-17 11:02:46" ] }, { "cell": [ "story", "51444", "Penn State's Lunar Lion team aims to land vehicle on moon by 2015", "2011-02-17 08:17:12" ] }, { "cell": [ "story", "51427", "Students flock to Spring Career Fair", "2011-02-16 12:56:27" ] }, { "cell": [ "story", "51419", "Ice Campaign receives $1 million gift from Paul and Nancy Silvis", "2011-02-16 10:51:45" ] }, { "cell": [ "story", "51353", "CarbonEARTH program facilitates science education, teaching", "2011-02-15 15:59:04" ] } ], "messages": null } 

这一切在jquery 1.4.2中运行良好

我想我必须等待升级,但我想我会检查一下是否有其他人有解决方案?

好的,所以我在一些搜索后找到了正确的解决方案,我找到了jQuery Validate的错误报告 。 在报告的底部,validate的作者提供了一个分叉版本,可以解决问题,感谢所有人的帮助

最有可能的原因是jquery.validate.js中的错误。 有一个快速(不推荐!)修复jQuery.ajaxSetup({ jsonp: null, jsonpCallback: null}); – 如果它适合您,请进一步查看不同的选项,在1.5版本中讨论 “无效标签”问题。

这是一个错误,它在1.5.1中修复。 查看票据http://bugs.jquery.com/ticket/8125 ,您可以在http://code.jquery.com/jquery-git.js找到最新的jQuery版本及最新修订版本。

你也可以尝试jQuery.ajaxSetup({ jsonp: null, jsonpCallback: null}); 根据这个线程JQuery 1.5和新的“Text JSON”数据类型