javascript实现省市区三级联动下拉框菜单_javascript技巧

WBOY
Release: 2016-05-16 15:31:52
Original
1300 people have browsed it

本文实例讲述了javascript实现省市区三级联动下拉框菜单代码。分享给大家供大家参考。具体如下:
运行效果截图如下:

首先写一个静态的页面:

   QQ JS省市区三级联动    
  
Copy after login

调用的geo.js源码:

function Dsy() { this.Items = {}; } Dsy.prototype.add = function (id, iArray) { this.Items[id] = iArray; } Dsy.prototype.Exists = function (id) { if (typeof(this.Items[id]) == "undefined") return false; return true; } function change(v) { var str = "0"; for (i = 0; i 0 || !v) { if (dsy.Exists(str)) { ar = dsy.Items[str]; for (i = 0; i
Copy after login
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!