Home >Web Front-end >JS Tutorial >jquery json universal three-level linkage drop-down list_jquery
Author: shaoyun
Email: shaoyun (at) yeah.net
Date: 2010-03-10 02:03
Blog: http://shaoyun.cnblogs.com/
Use Jquery implementation, the original code only supports IE, I changed it here, there are three versions of the implementation in my code
The first one is built by reading XML, supports IE/firefox, chrome does not support it, if you are interested, you can Change the XML reading part to AJAX, so that chrome support will not be a problem
The second one is built using Json data format, which is my second attempt to improve it
The third one is actually the same as the second one It's the same, but the data is separated into JS files. There is an ASP file in my code, which calls the database to generate Json province and city data. If the page directly calls the ASP file, the speed will be very slow. After generating the JS file It is much faster to call it directly, and this part of the data will generally not change
Update record:
2010-04-19 12:11:24
Added one more The example of a plug-in is not actually a plug-in, it is just a function. Why not write it as a plug-in? It is just based on flexibility considerations.
allows the select to be placed anywhere on the page, instead of being limited to page elements such as div, table, td, etc. The inner
parameters are similar to the following. s1/s2/s3 configures the select id, and v1/v2/v3 is the default value. If you do not want to set it, please set it to null, or do not set it directly. The
parameter configuration is as follows, configure The three IDs and default values of select are enough. If there is no default value, fill in null