【发布时间】:2008-11-27 11:32:30
【问题描述】:
我发现了奇怪的错误(也许)。当我以散列的形式向$.ajax 发送参数,并尝试检查$.ajaxSend 中的参数时,我发现settings.data 为空,settings.url 包含参数是正常的。然后我查看了jQuery代码,发现数据被删除了。
// If data is available, append data to url for get requests
if ( s.data && type == "GET" ) {
s.url += (s.url.match(/\?/) ? "&" : "?") + s.data;
// IE likes to send both get and post data, prevent this
s.data = null;
}
现在我需要解析 url ((。怎么办?
In JQuery, using ajaxSend to preview the url built by $.post call
在 cmets 中,我看到数据应该在那里。
【问题讨论】: