This article introduces the example code for implementing the ajax three-level linkage drop-down menu.
This article introduces the example code for implementing the ajax three-level linkage drop-down menu.
Ajax write three levels of association, first write a file class, then you can directly call it when using it;
Find a table:
Let's talk about the following ideas:
(1) when the user selects a province, the event is triggered, and the id of the current province is sent to the server program through ajax.
(2) for example, if the China region is used and the China region is 0001, the China region is 0001;
If the code is 11 in Beijing, then the child number 11 is the City in Beijing,
That is to say, the subcode is queried based on the primary Code;
(3) the server queries the database based on client requests and returns the database to the client in a certain format.
The page display is very simple. you only need one p and introduce the js and jquery files:
Untitled Document