Welcome aboard! We are happy you are here and wish you good net-raft!
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<script src="/vanilla.js"></script>
</head>
<body>
<script type="text/javascript">
var request = new XMLHttpRequest();
request.open('GET', 'http://freegeoip.net/json/', true);
request.onload = function() {
if (request.status >= 200 && request.status < 400) {
var data = JSON.parse(request.responseText);
alert("Success: " + data.time_zone);
} else {
}
};
request.onerror = function() {
};
request.send();
</script>
</body>
</html>
The most helpful VANILLAJS solutions
get hostname using vanillajsVANILLAJS
Click to see more ...
777
31
get client country using vanillajsVANILLAJS
Click to see more ...
794
24
get client region name using vanillajsVANILLAJS
Click to see more ...
461
24
get ip address using vanillajsVANILLAJS
Click to see more ...
900
22
detect cut paste in textarea using vanillajsVANILLAJS
Click to see more ...
340
18
get client latitude longitude using vanillajsVANILLAJS
Click to see more ...
363
6
get client timezone using vanillajsVANILLAJS
Click to see more ...
256
1
get client city using vanillajsVANILLAJS
Click to see more ...
213
0