var xhr = new XMLHttpRequest();
xhr.open("GET", url, false);
xhr.send();
document.getElementById("res").innerText = xhr.responseText;

如何获取到 response 对象
Copyright 2014-2026 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号
你需要学习ajax的基本用法,和跨域无关.