jQuery 将 XMLHttpRequest 对象抽象为所谓的“超集”,它不公开 responseURL 字段。在他们的文档中,他们谈论“jQuery XMLHttpRequest (jqXHR) 对象”
For backward compatibility with XMLHttpRequest, a jqXHR object will expose the following properties and methods:
readyState
responseXML and/or responseText when the underlying request responded with xml and/or text, respectively
status
statusText
abort( [ statusText ] )
getAllResponseHeaders() as a string
getResponseHeader( name )
overrideMimeType( mimeType )
setRequestHeader( name, value ) which departs from the standard by replacing the old value with the new one rather than concatenating the new value to the old one
statusCode( callbacksByStatusCode )
No onreadystatechange mechanism is provided, however, since done, fail, always, and statusCode cover all conceivable requirements.
如您所见,没有办法获取响应 URL,因为 jqXHR API 没有公开它