<html> <HEAD> <script language="javascript"> <!-- var where = new Array(36); function comefrom(loca,locacity) { this.loca = loca; this.locacity = locacity; } where[0]= new comefrom("请选择省份名","请选择城市名"); where[1] = new comefrom("北京","|东城|西城|崇文|宣武|朝阳|丰台|石景山|海淀|门头沟|房山|通州|顺义|昌平|大兴|平谷|怀柔|密云|延庆"); where[2] = new ...
需要的朋友可以把下面这段代码拷贝过去使用,保存成网页格式即可,全国31个省的所有市县都有<html><head><title>省市县关联菜单</title><meta http-equiv="Content-Type" content="text/html; charset=gb2312"><style>body,select{font-size:9pt;font-family:Verdana;}a{color:red;text-decoration:none;}a:hover{text-decoration:underline;}</style><SCRIPT LANGUAGE="JavaScript"><!--function Dsy(){this.Items = {};}Dsy.prototype.add = function(id,iArray){this.Items[id] = iArray;}Dsy.prototy...
<?php
function get_ip_place(){
$ip=file_get_contents("http://fw.qq.com/ipaddress");
$ip=str_replace('"',' ',$ip);
$ip2=explode("(",$ip);
$a=substr($ip2[1],0,-2);
$b=explode(",",$a);
return $b;
}
$ip=get_ip_place();
print_r($ip);
?>
必须在联网的条件下使用,使用腾迅的一个api,即http://fw.qq.com/ipaddress,打开这个地址看看:var IPData = new Array("117.80.36.111","","江苏省","苏州市");
然后用php进行了简单的处理,使返回的结果用数组形式显示:
即Array ( [0] =>117.80.36.111 [1] => [2] => 江苏省...