如果该 API 设置了适当的 CORS 标头(从我的测试来看似乎确实如此),则可以使用名为 fetch 的本机浏览器函数调用它。例如:fetch('https://launchlibrary.net/1.4/launch/next/1') // Convert response to JSON .then(r => r.json()) // Show name in console .then(data => console.log(data.launches[0].name));然后,您可以使用数据与 DOM 进行交互,如下所示:fetch('https://launchlibrary.net/1.4/launch/next/1') // Convert response to JSON .then(r => r.json()) // Show name to user .then(launchData => alert(launchData.launches[0].name));