[英]HBBTV 1.1.1 xmlhttprequest.responseURL
我需要在 vaniliaJS 中為 hbbtv 1.1.1(版本瀏覽器 Opera 12.11)獲取 xmlhttprequest.responseURL。 有誰知道答案嗎?
如果您需要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.