小编use*_*678的帖子

检测国家和重定向

这是我的代码,但它不起作用.

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"></script>
<script src="http://api.wipmania.com/jsonp?callback.js"></script>
<script type="text/javascript">
switch(country_code()){
case "IN" :
        document.location.href = "http://xxxxxxxx.biz/theme.php";
        break;
}
</script> 
<meta http-equiv="Content-type" content="text/html; charset=utf-8" />
</html>
Run Code Online (Sandbox Code Playgroud)

我想检测用户的国家/地区并适当地重定向它们.

html javascript json jsonp

2
推荐指数
1
解决办法
4402
查看次数

标签 统计

html ×1

javascript ×1

json ×1

jsonp ×1