三级联动(省市县)

来源:互联网 发布:solidworks能编程吗 编辑:程序博客网 时间:2024/05/16 18:00
<pre name="code" class="cpp">/* PCAS (Province City Area Selector 省、市、地区联动选择JS封装类) Ver 2.04 完整版 *\ 制作时间:2005-12-30 更新时间:2006-01-24 数据修正:2012-01-17(截止2011年10月31日) 演示地址:http://www.popub.net/script/pcasunzip.html 下载地址:http://www.popub.net/script/pcasunzip.js 应用说明:页面包含<script type="text/javascript" src="pcasunzip.js" charset="gb2312"></script>省市联动new PCAS("Province","City")new PCAS("Province","City","吉林省")new PCAS("Province","City","吉林省","吉林市")省市地区联动new PCAS("Province","City","Area")new PCAS("Province","City","Area","吉林省")new PCAS("Province","City","Area","吉林省","松原市")new PCAS("Province","City","Area","吉林省","松原市","宁江区")省、市、地区对象取得的值均为实际值。注:省、市、地区提示信息选项的值为""(空字符串)\*** 程序制作/版权所有:崔永祥(333) E-Mail:zhadan007@21cn.com 网址:http://www.popub.net ***/会会显得的插件:通过<script language="javascript" src="${pageContext.request.contextPath}/script/PCASClass.js"></script>来引用插件:addUI:<tr><td height="25" bgcolor="#FFFFFF" width="10%"><div align="center" class="STYLE1"><div align="center">所在省</div></div></td><td height="25" bgcolor="#FFFFFF" width="10%"><div align="center" class="STYLE1"><div align="center"><select name="Province"></select></div></div></td><td height="25" bgcolor="#FFFFFF" width="10%"><div align="center" class="STYLE1"><div align="center">所在市</div></div></td><td height="25" bgcolor="#FFFFFF" width="10%"><div align="center" class="STYLE1"><select name="City"></select></div></td><td height="25" bgcolor="#FFFFFF" width="10%"><div align="center" class="STYLE1"><div align="center">所在区域/县</div></div></td><td height="25" bgcolor="#FFFFFF" width="10%"><div align="center" class="STYLE1"><div align="center"><select name="area_county"></select></div></div></td></tr><script language="javascript" defer>new PCAS("Province","City","area_county","河南省","周口市","川汇区");</script>editUI:<tr><td height="25" bgcolor="#FFFFFF" width="10%"><div align="center" class="STYLE1"><div align="center">所在省</div></div></td><td height="25" bgcolor="#FFFFFF" width="10%"><div align="center" class="STYLE1"><div align="center"><select name="Province"></select> <input type="hidden"name="Provincename" id="Provincename" value="${Province}"size="1" /></div></div></td><td height="25" bgcolor="#FFFFFF" width="10%"><div align="center" class="STYLE1"><div align="center">所在市</div></div></td><td height="25" bgcolor="#FFFFFF" width="10%"><div align="center" class="STYLE1"><select name="City"></select> <input type="hidden"name="Cityname" id="Cityname" value="${City}" size="1" /></div></td><td height="25" bgcolor="#FFFFFF" width="10%"><div align="center" class="STYLE1"><div align="center">所在区域/县</div></div></td><td height="25" bgcolor="#FFFFFF" width="10%"><div align="center" class="STYLE1"><div align="center"><select name="area_county"></select> <input type="hidden"name="areacounty" id="areacounty" value="${area_county}"size="1" /></div></div></td></tr><script language="javascript" defer>var Province = $("#Provincename").val();var City =  $("#Cityname").val();var area_county =   $("#areacounty").val();new PCAS("Province","City","area_county",Province,City,area_county);</script>

1 0
原创粉丝点击