PHP API 数据获取与 HTML 展示 - 使用 fetch API
<script>
fetch('api.php?type=example')
.then(response => response.json())
.then(data => {
document.getElementById('result').innerHTML = JSON.stringify(data);
});
</script>
原文地址: https://www.cveoy.top/t/topic/pbkB 著作权归作者所有。请勿转载和采集!