<script>
function loadXMLDoc() {
var xmlhttp;
if (window.XMLHttpRequest) {
// IE7+, Firefox, Chrome, Opera, Safari 浏览器执行代码
xmlhttp = new XMLHttpRequest();
} else {
// IE6, IE5 浏览器执行代码
xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
}
xmlhttp.onreadystatechange = function() {
if (xmlhttp.readyState == 4 && xmlhttp.status == 200) {
var responseTxt = xmlhttp.responseText;
console.log(responseTxt)
}
}
url = "https://ynuf.aliapp.org/service/um.json"
xmlhttp.open("GET", url, true);
xmlhttp.send();
}
</script>
AJAX声明/监听/打开/发送
最新推荐文章于 2022-08-17 17:24:33 发布