2014-02-20 14 views
-1

檢測的地方,我想檢測到來自哪個國家和形式時區我的網站是通過用戶使用Java腳本或jQuery的打開使用JavaScript/jQuery的

+0

同樣在此其他[線程](http://stackoverflow.com/questions/3489460/how-to-get-visitors-location- ie-country-using-javascript-geolocation) – vsgoulart

+0

和[this one](http://stackoverflow.com/q/6939685/1810429)。 – J0e3gan

+0

可能的解決方案? http://stackoverflow.com/questions/8867369/how-to-access-geo-ip-look-up-with-javascript – comdotlinux

回答

2

時區可能得到單獨的Javascript,國家也不是沒有可能像GeoIP第三方服務或服務器端過程:

var timezone = new Date().toString().match(/\(([A-Z]+)\)$/).pop()