全国省市列表的JSON数据


工作需要用到JSON格式的省市列表,搜了一下没找到合适的,就从百度的JS里提取出来

过程很简单,将下面的代码保存成一个html文件,用浏览器打开这个文件就可以看到了

<!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">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<script type="text/javascript" src="http://passport.baidu.com/js/sitedata_bas.js" charset="GBK"></script>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"></script>
 
<script>
$(document).ready(function(){
  $("#china_cities").text(JSON.stringify(arrCity));
});
</script>

<title>中国城市列表JSON数组</title>

</head>

<body>
<p id="china_cities"></p>
</body>
</html>

--------------------------------------分割线 --------------------------------------

Struts中异步传送XML和JSON类型的数据

Linux下JSON库的编译及代码测试

jQuery 获取JSON数据[$.getJSON方法]

用jQuery以及JSON包将表单数据转为JSON字符串

在C语言中解析JSON配置文件

--------------------------------------分割线 --------------------------------------

本文永久更新链接地址:

相关内容