【发布时间】:2020-09-09 01:59:02
【问题描述】:
我在这段代码中遇到错误,应该等于内部 html
var xhttp = new XMLHttpRequest();
xhttp.onreadystatechange = function()
{
if (this.readyState == 4 && this.status == 200)
{
document.getElementById("id").innerHTML = `enter code here`;
}
};
xhttp.open("GET","https://api.openweathermap.org/data/2.5/weatherq=London,uk&appid=2ed23a9e218c67041a6853dec1eb24da", true);
xhttp.send();
【问题讨论】:
标签: javascript html ajax innerhtml