Home JS special effects jQuery effects jQuery four-level linkage drop-down menu code

jQuery four-level linkage drop-down menu code

jQuery four-level linkage drop-down menu code

jQuery four-level linkage drop-down menu code

jQuery four-level linkage drop-down menu code, three-level and four-level linkage city selection, province, city, and district selection, also supports street address selection code, delivery address four-level linkage menu js special effects.

Part of js code
<script type="text/javascript">
var $town = $('#demo3 select[name="town"]');
var townFormat = function(info){
$town.hide().empty();
if(info['code']%1e4&&info['code']<7e5){ //Whether it is a "district" and not Hong Kong, Macao and Taiwan
$.ajax({
url:'http://passer-by.com/data_location/town/'+info['code']+'.json',
dataType:'json',
success:function(town){
$town.show();
for(i in town){
$town.append('<option value="'+i+'">'+town[i]+'</option>');
}
}
});
}
};
$('#demo3').citys({
province:'Fujian',
city:'Xiamen',
area:'Siming',
onChange:function(info){
townFormat(info);
}
},function(api){
var info = api.getInfo();
townFormat(info);
});
</script>
Disclaimer

All resources on this site are contributed by netizens or reprinted by major download sites. Please check the integrity of the software yourself! All resources on this site are for learning reference only. Please do not use them for commercial purposes. Otherwise, you will be responsible for all consequences! If there is any infringement, please contact us to delete it. Contact information: admin@php.cn

Related Article

jQuery implements multi-level drop-down menu code with animated effects_jquery jQuery implements multi-level drop-down menu code with animated effects_jquery

16 May 2016

This article mainly introduces the jQuery code to implement multi-level drop-down menus with animation effects, which can achieve the effect of fading in and out when clicked. It involves the traversal and chain operation of jQuery page elements. It has certain reference value. Friends who need it can For reference

jQuery tree drop-down menu special effects code sharing_jquery jQuery tree drop-down menu special effects code sharing_jquery

16 May 2016

This article mainly introduces jQuery to implement magic tree drop-down menu effects. The code is simple and very practical. Friends in need can refer to it.

jQuery three-level drop-down list navigation menu code sharing_jquery jQuery three-level drop-down list navigation menu code sharing_jquery

16 May 2016

This article mainly introduces the jQuery three-level drop-down list navigation menu. It is recommended to everyone. Friends who need it can refer to it.

Ajax three-level linkage drop-down menu implementation (with code) Ajax three-level linkage drop-down menu implementation (with code)

02 Apr 2018

This time I will bring you the implementation of ajax three-level linkage drop-down menu (with code). What are the precautions for implementing ajax three-level linkage drop-down menu? Here is a practical case, let's take a look.

jquery+json universal three-level linkage drop-down list jquery+json universal three-level linkage drop-down list

12 Dec 2016

jquery+json universal three-level linkage drop-down list, there are three versions of implementation in the code

jquery json universal three-level linkage drop-down list_jquery jquery json universal three-level linkage drop-down list_jquery

16 May 2016

Implemented with Jquery. The original code only supports IE. I changed it here. There are three versions of implementation in my code.

jQuery implements exquisite multi-level drop-down menu effects_jquery jQuery implements exquisite multi-level drop-down menu effects_jquery

16 May 2016

This article mainly introduces jQuery’s implementation of exquisite multi-level drop-down menu effects, which is mainly realized by relying on jQuery’s fg.menu.js plug-in. The effect is very good, and I recommend it to everyone.

Example code to implement ajax three-level linkage drop-down menu Example code to implement ajax three-level linkage drop-down menu

23 Mar 2017

This article introduces the example code to implement ajax three-level linkage drop-down menu

jQuery PHP MySQL secondary linkage drop-down menu example explanation_jquery jQuery PHP MySQL secondary linkage drop-down menu example explanation_jquery

16 May 2016

This article mainly introduces a secondary linkage drop-down menu implemented by the combination of jQuery, PHP and MySQL. Friends in need can refer to it.

See all articles See all articles

Hot Tools

jQuery2019 Valentine's Day Confession Fireworks Animation Special Effects

jQuery2019 Valentine's Day Confession Fireworks Animation Special Effects

A very popular jQuery Valentine's Day confession fireworks animation special effect on Douyin, suitable for programmers and technical geeks to express their love to the girl they love. No matter you choose to be willing or not, you have to agree in the end.

layui responsive animated login interface template

layui responsive animated login interface template

layui responsive animated login interface template

520 Valentine's Day confession web animation special effects

520 Valentine's Day confession web animation special effects

jQuery Valentine's Day Confession Animation, 520 Confession Background Animation

Cool system login page

Cool system login page

Cool system login page

HTML5 tape music player-CASSETTE PLAYER

HTML5 tape music player-CASSETTE PLAYER

HTML5 tape music player-CASSETTE PLAYER