Home > Web Front-end > JS Tutorial > jQuery drop-down list secondary linkage plug-in sharing_jquery

jQuery drop-down list secondary linkage plug-in sharing_jquery

WBOY
Release: 2016-05-16 17:54:42
Original
1105 people have browsed it

jQuery secondary linkage plug-in: jQuery.selected
A page can reference multiple linkage effects. How to use:
Configure js:

Copy code The code is as follows:

var defaults = {
NextSelId: '#Select2',
SelTextId: '#Text1',
Separator: '-- ',
SelStrSet: [
{ name: 'Please select', subname: 'Please select'},
{ name: '★Gao Qiben★', subname: 'Computer Science and Technology|Chinese Language and literature' },
{ name: '★Gaoqizhuan★', subname: 'Chinese education|Secretarial|Preschool education|Tourism management|Legal affairs|Economic management|Computerized accounting|E-commerce|Computer information management |Software Engineering|Mechatronics|Fine Chemical Production Technology|Mechanical Manufacturing Design and Automation|Broadcasting and Hosting|Art Design|Calligraphy Direction Art Design' },
{ name: '★College to Bachelor's Degree★', subname: 'Thought Political Education|Chinese Language and Literature|English|Mathematics and Applied Mathematics|Electronic Information Engineering|Computer Science and Technology|Accounting|Public Utilities Management|Tourism Management|Physical Education|Musicology|Art Design|Calligraphy Direction Art Design'}]
}
var defaults2 = {
NextSelId: '#Select4',
SelTextId: '#Text2',
Separator: '★',
SelStrSet: [
{ name : 'Please select', subname: 'Please select'},
{ name: 'Beijing', subname: 'Beijing1|Beijing2' },
{ name: 'Shanghai', subname: 'Shanghai1 |Shanghai 2|Shanghai 3|Shanghai 4' },
{ name: 'Tianjin', subname: 'Tianjin'}]
}

Configuration instructions:
NextSelId: ID of the drop-down list that needs to be loaded in conjunction
SelTextId: ID of the text box that displays the selection option
Separator: Split strings for first-level and second-level menus
SelStrSet: Configure drop-down options
[{ name: ' Please select', subname: 'Please select'}]
Name: first-level drop-down option; subname: second-level drop-down option, separate multiple with "|";

html page:
Copy code The code is as follows:












If you have any good suggestions, please leave a comment!

Complete JS download address
Related labels:
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template