XMLHttpRequest.responseURL

这篇翻译不完整。请帮忙从英语翻译这篇文章

 如果URL为空,只读的XMLHttpRequest.responseURL属性返回响应的序列化URL或空字符串。当URL被返回的时候,任何包含在URL # 后面的fragment都会被删除。 responseURL 的值将会是经过任意多次重定向后的最终 URL 。

实例

var xhr = new XMLHttpRequest();
xhr.open('GET', 'http://example.com/test', true);
xhr.onload = function () {
  console.log(xhr.responseURL); // http://example.com/test
};
xhr.send(null);

规范

Specification Status Comment
XMLHttpRequest Living Standard WHATWG living standard

浏览器兼容性

We're converting our compatibility data into a machine-readable JSON format. This compatibility table still uses the old format, because we haven't yet converted the data it contains. Find out how you can help!

Feature Chrome Firefox (Gecko) Internet Explorer Opera Safari (WebKit)
Basic support 37.0 32.0 (32.0) 未实现 24 8.0
Feature Android Chrome for Android Firefox Mobile (Gecko) IE Mobile Opera Mobile Safari Mobile
Basic support ? ? ? ? ? ?

 

文档标签和贡献者

此页面的贡献者: CodingSherlock, xgqfrms-GitHub, holynewbie
最后编辑者: CodingSherlock,