此代码在运行时显示页面,然后将其重定向。我希望它能够快速重定向,但不是。
我在哪里创建应用程序blogspot.com
<script>
fetch('https://freegeoip.app/json/')
.then(function(response) {
return response.json();
})
.then(function(data) {
if(data.country_code == 'TR') {
window.location.replace("https://www.google.com");
}
})
</script>
1。具有浏览器语言的JavaScript解决方案(无延迟)