请写一个html网页能够查找从10000gradioapp到30000gradioapp之间哪个网址可以访问并将结果都呈现出来
查找10000.gradio.app到30000.gradio.app之间可访问的网址
<script>
const result = document.getElementById("result");
for(let i=10000; i<=30000; i++){
const url = `http://${i}.gradio.app`;
fetch(url, {method: 'HEAD'})
.then(res => {
if(res.ok){
const li = document.createElement("li");
const text = document.createTextNode(`可访问:${url}`);
li.appendChild(text);
result.appendChild(li);
}
})
.catch(err => console.log(err));
}
</script>
原文地址: https://www.cveoy.top/t/topic/bC5D 著作权归作者所有。请勿转载和采集!