【发布时间】:2014-03-11 20:40:56
【问题描述】:
这是我的代码,但它不起作用。
<!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>
我想检测用户的国家并适当地重定向他们。
【问题讨论】:
标签: javascript html json jsonp