Home > Back-end >  A small problem with bosses
A small problem with bosses

Time:09-20

Small white asked bosses question is now have a demand is the id I will send it according to the front to do a query
But the front side this id is to first show on the page of
The user when the time comes to choose
I want to write an interface pass the id to him?
But the front then can a drop-down box two interfaces, and should not



CodePudding user response:

The two are not conflict, if the front to show the id is the course of classification, that is invoked when the page render your interface to get the data, rendering the drop-down box, when a user selects corresponding classification, pass the id to you

CodePudding user response:

Ajax to get id should write an interface

CodePudding user response:

Need to write two interfaces, the interface of a query id, a according to the id of the data interface; Front-end interface initialization when the query id, choose the contents of the drop-down box after call according to the id to do data query interface

CodePudding user response:

The front of the id is not to show on the page, such as after completion of the user to select for the user to select the id no (I understand so)

CodePudding user response:

1, general id is meaningless, as has the primary key of the database;
2, a list of query interface, all need to display the drop-down box data query;
3, the id as the value of drop-down boxes, name as the text of a drop-down box, rendering the drop-down box, according to the text to the user;
4, the user through a drop-down box, select the need to the name of the query, and then the front script for the selected user id to the query interface,
  • Related