首页 技术教程 实用代码 注册破解 正则表达式 网址导航 电子书籍

省市二级联动菜单程序

<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 ...
类别:网页编程 - JavaScript    查看:123    更新:2014-05-21

全国省市县无刷新多级关联连动菜单

需要的朋友可以把下面这段代码拷贝过去使用,保存成网页格式即可,全国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...
类别:网页编程 - JavaScript    查看:106    更新:2014-05-21

php获取ip地址以及所在省市

<?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] => 江苏省...
类别:网页编程 - PHP技术    查看:127    更新:2014-05-19