我正在使用phpdevshell(使用最新的jQuery)创建一个应用程序。
I'm creating an app using phpdevshell (which uses latest jQuery).
现在我没有任何理由可以看到,jQuery开始请求以undefined结尾的url 这不存在并导致404.
Now without any reason visible to me, jQuery started requesting an url ending with "undefined" which doesn't exist and causes 404.
它寻找这个网址: http:// localhost / mysite / undefined
我找到了执行此操作的jQuery部分(从第7866行开始):
I've located the part of jQuery that does this (starting at line 7866):
// Do send the request // This may raise an exception which is actually // handled in jQuery.ajax (so no try/catch here) xhr.send( ( s.hasContent && s.data ) || null );知道为什么会这样吗?谢谢。
Any idea why this happens? Thanks.
推荐答案看起来你正在构建一个带有返回undefined的变量的url。即:var url = http:// localhost / mysite / +变量;变量未定义的地方。
It looks like you're building an url with a variable that returns undefined. Ie: var url = " localhost/mysite/" + variable; where variable is undefined.
更多推荐
jQuery请求未定义的url(与phpdevshell一起使用)
发布评论