[英]HBBTV 1.1.1 xmlhttprequest.responseURL
i need get xmlhttprequest.responseURL for hbbtv 1.1.1 (version browser Opera 12.11) in vaniliaJS.我需要在 vaniliaJS 中为 hbbtv 1.1.1(版本浏览器 Opera 12.11)获取 xmlhttprequest.responseURL。 Is there somebody, who know the answer?有谁知道答案吗?
If you need the response in the XMLHttpRequest()
then the answer is:如果您需要XMLHttpRequest()
中的响应,那么答案是:
try{
var xhttp = new XMLHttpRequest();
xhttp.onreadystatechange = function() {
if (this.readyState == 4 && this.status == 200) {
//do something here if you want
}
};
xhttp.open("GET", URL, true); //true for synchronous and false for asynchronous
xhttp.send();
} catch (error){
//do something with the error
}
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.