萬盛學電腦網

 萬盛學電腦網 >> 網絡編程 >> php編程 >> 判斷浏覽器語言類型

判斷浏覽器語言類型

.
var yu_yan = navigator.language || navigator.userlanguage;
if(yu_yan.substr(0, 3) == "zh-"){
window.location='sorry.php教程';
}

php

echo $_server['http_accept_language'];

獲取所有信息

echo $_server['http_user_agent'];

copyright © 萬盛學電腦網 all rights reserved