我正在尝试访问和显示存储在特定 url 中的数据。但是我的代码运行不正确。对此有何建议?
function getData( theURL ) {
var xmlHttp = null;
xmlHttp = new XMLHttpRequest();
xmlHttp.open( "GET", theURL, false );
xmlHttp.send( null );
return xmlHttp.responseText;
}
var url = "https://cloudant.com/futon/document.html?acharya%2Ftoxtweet/ff558f75077e8c758523cd3bd8ffdf88";
getData(url);