2011-07-11 151 views
0

如何使用Javascript查找腳本運行的頁面的語言環境?Javascript:查找當前頁面的語言環境

+0

[檢測,選擇和保存Cookie中的訪客語言和國家與JS]可能的重複(http://stackoverflow.com/questions/4714689/detecting-selecting-and-saving-visitor-language-and-country- in-cookie-with-js)指向[使用javascript和Google API自動查找網頁訪問者的位置](http://briancray.com/2009/05/29/find-web-visitors-location-javascript-google- api /) – mplungjan

+0

或[如果訪問者來自某個國家,是否可以運行代碼](http://stackoverflow.com/questions/3696218/is-it-possible-to-run-code-if-visitor來自某個特定國家) – mplungjan

+0

你爲什麼想知道? – RobG

回答

-2

您的意思是網頁運行的網址?你可以得到如下:

var loc = window.location.href;

+0

更可能是國家/語言設置 – mplungjan

相關問題