CN108038142A - Realize method, electronic device and the storage medium of multistage linking combobox - Google Patents

Realize method, electronic device and the storage medium of multistage linking combobox Download PDF

Info

Publication number
CN108038142A
CN108038142A CN201711210184.4A CN201711210184A CN108038142A CN 108038142 A CN108038142 A CN 108038142A CN 201711210184 A CN201711210184 A CN 201711210184A CN 108038142 A CN108038142 A CN 108038142A
Authority
CN
China
Prior art keywords
combobox
option
group
array
prime
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201711210184.4A
Other languages
Chinese (zh)
Inventor
赵宝森
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Ping An Technology Shenzhen Co Ltd
Original Assignee
Ping An Technology Shenzhen Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Ping An Technology Shenzhen Co Ltd filed Critical Ping An Technology Shenzhen Co Ltd
Priority to CN201711210184.4A priority Critical patent/CN108038142A/en
Priority to PCT/CN2018/083076 priority patent/WO2019100645A1/en
Publication of CN108038142A publication Critical patent/CN108038142A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/957Browsing optimisation, e.g. caching or content distillation

Landscapes

  • Engineering & Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention discloses a kind of method for realizing multistage linking combobox, belong to page data processing technology field.A kind of method for realizing multistage linking combobox, includes the following steps:S1, structure database:At least one option group is stored with the database, some options arranged by hierarchical relationship are included in option group described in every group;S2, loading option:When the combobox page is accessed, option is changed into array by performing JS intercept methods, then each array is loaded onto in corresponding combobox;The display of S3, the option that links:Change events in previous stage combobox, include the array of previous stage combobox option to when the matching of prime combobox, then by JS intercept methods obtain in array when prime combobox option be put into it is described when in prime combobox.The option with hierarchical relationship that the present invention can be provided according to user, automatically generates the combobox group option for possessing multistage linking relation.

Description

Realize method, electronic device and the storage medium of multistage linking combobox
Technical field
The present invention relates to page data processing technology field, more particularly to a kind of method for realizing multistage linking combobox, Electronic device and storage medium.
Background technology
With the development of internet, the marketing activity of enterprise under line to shifting on line, it is real by internet and social circle Existing Brand Marketing, customer service, obtain the targets such as client.
When client is by marketing activity page activity on line, it is often necessary to fill in some personal information, such as Location.Filled in for convenience of client, improve customer experience, the word for usually all as far as possible filling in client is down at least, in address often The mode of filling in is exactly to be carried out using combobox.But multistage linking plug-in unit typically now is substantially and is saved on the whole nation Urban district three-level linkage, the plug-in unit of interaction relation can not be automatically generated according to correspondence substantially, is so difficult to meet net Want to allow user to select input content using the linkage of combobox in page end.Moreover, the loading of existing webpage combobox is too slow, data are wanted Just loaded out etc. even more than ten seconds several seconds, client will lose patience, some can also directly close the webpage, and no longer participating in should Marketing activity.
Customer experience many times represents business opportunity, actively, is efficiently experienced for one to client, they can more be happy to participate in Your marketing activity, and the evaluation to enterprise can be improved.
Therefore, while can also be improved now there is an urgent need for a kind of self-defined plug-in unit for automatically generating linkage combobox in combobox The loaded and displayed speed of content, to improve customer experience, makes client more be happy to fill data activity.
The content of the invention
The technical problem to be solved in the present invention is in order to overcome in the prior art webpage combobox cannot it is self-defined generation and The problem of option loading is too slow, it is proposed that a kind of method for realizing multistage linking combobox, electronic device and storage medium, can be with The incidence relation provided according to user, automatically generates the combobox group option for possessing multistage linking relation, and loaded and displayed speed It hurry up.
The present invention is to solve above-mentioned technical problem by following technical proposals:
A kind of method for realizing multistage linking combobox, includes the following steps:
S1, structure database:At least one option group is stored with the database, is wrapped in option group described in every group Contain some options arranged by hierarchical relationship;
S2, loading option:When the combobox page is accessed, option group is changed into number by performing JS intercept methods Each array, is then loaded onto in corresponding combobox by group;
S3, option display linkage:Change events in previous stage combobox, include to when the matching of prime combobox There is the array of previous stage combobox option, then obtained by JS intercept methods in array and be put into institute when prime combobox option State when in prime combobox.
Preferably, step S1 specifically include it is following step by step:
Option in each option group, be ranked up by hierarchical relationship from high to low by S11 respectively;
S12, add identical group separator between the respective option group;
S13, in units of option group, identical option separator is added between the respective option;
S14, preserve each option, group separator and option separator into the respective field of database.
Preferably, the option of identical quantity or varying number is included in option group described in every group, the level is closed Number of options in system in option group described in the number of plies of the level single group most with including number of options is corresponding.
Preferably, step S2 specifically include it is following step by step:
S21, when the combobox page is accessed, the option group that is stored in called data storehouse;
S22, by JS intercept methods, the option in the respective option group is intercepted successively, by default option group and number The option group is changed into some arrays arranged by hierarchical relationship by the transformation rule between group;
Each array, be loaded into corresponding combobox by S23.
Preferably, the transformation rule between the option group and array is as follows:
{A1、A2、......An}=[A1], [A1, A2] ... [An-1, An];
Wherein, { A1、A2、......AnRepresent set of option group, A1、A2、......AnRepresent in set of option group Comprising n option, n is positive integer, [A1], [A1, A2] ... [An-1, An] represent and the corresponding n number of n option Group.
Preferably, step S3 specifically include it is following step by step:
S31, judge whether previous stage combobox occurs change events, if performing step S32, performs this step if not S31;
S32, obtain the previous stage combobox option pointed by change events described in previous stage combobox;
S33, filter out from the array being loaded onto in the prime combobox and include the previous stage combobox option Array;
S34, by JS intercept methods, intercept included in the array filtered out when prime combobox option;
S35, by described in interception when prime combobox option is put into when in prime combobox.
A kind of electronic device, including memory and processor, are stored with and can be performed by the processor on the memory The system for realizing multistage linking combobox, the system for realizing multistage linking combobox includes:
Database, is stored with least one option group in the database, include in option group described in every group by Some options of hierarchical relationship arrangement;
Load-on module, for when the combobox page is accessed, being changed into option group by performing JS intercept methods Each array, is then loaded onto in corresponding combobox by array;
Interlocking module, for the change events in previous stage combobox, includes to when the matching of prime combobox The array of previous stage combobox option, is then obtained described in being put into when prime combobox option in array by JS intercept methods When in prime combobox.
Preferably, the load-on module specifically includes:
Submodule is called, for the option group when the combobox page is accessed, stored in called data storehouse;
Submodule is converted, for intercepting each option in option group successively by JS intercept methods, and presses default choosing The option group is changed into some arrays arranged by hierarchical relationship by the transformation rule between item group and array;
Submodule is loaded, for each array to be loaded into corresponding combobox.
Preferably, the interlocking module specifically includes:
Judging submodule, for judging whether previous stage combobox occurs change events;
Option acquisition submodule, for obtaining the previous stage drop-down described in previous stage combobox pointed by change events Frame option;
Submodule is screened, is included for being filtered out from the array being loaded onto in the prime combobox under the previous stage Draw the array of frame option;
Submodule is intercepted, for being intercepted by JS intercept methods included in the array filtered out when prime combobox selects ;
Output sub-module, for will show described in interception when prime combobox option is put into when in prime combobox.
A kind of computer-readable recording medium, the computer-readable recording medium memory, which contains, realizes that multistage linking pulls down The system of frame, the system for realizing multistage linking combobox can be performed by least one processors, so that described at least one A processor performs the step of method for realizing multistage linking combobox as any one of foregoing.
The positive effect of the present invention is:The option with hierarchical relationship that the present invention can be provided according to user, The combobox group option for possessing multistage linking relation is automatically generated, and combobox group option is disposably loaded when webpage is accessed Into comboboxs at different levels, the linkage of option need not inquire about background data base, and display speed is fast.
Brief description of the drawings
Fig. 1 shows the hardware structure schematic diagram of one embodiment of electronic device of the present invention;
Fig. 2 shows the program module for the system first embodiment that multistage linking combobox is realized in electronic device of the present invention Schematic diagram;
Fig. 3 is shown in the database for the system first embodiment that multistage linking combobox is realized in electronic device of the present invention The schematic diagram of the option group of preservation;
Fig. 4 shows option group in the system first embodiment that multistage linking combobox is realized in electronic device of the present invention Conversion schematic diagram between array;
Fig. 5 shows the interface used in the system first embodiment that multistage linking combobox is realized in electronic device of the present invention Schematic diagram;
Fig. 6 shows load-on module in the system second embodiment that multistage linking combobox is realized in electronic device of the present invention Further program module schematic diagram;
Fig. 7 shows interlocking module in the system second embodiment that multistage linking combobox is realized in electronic device of the present invention Further program module schematic diagram;
Fig. 8 shows that the present invention realizes the flow chart of the embodiment of the method one of multistage linking combobox;
Fig. 9 shows the structure flow chart of database in the embodiment of the method two of the invention for realizing multistage linking combobox;
Figure 10 shows that the present invention realizes the flow chart that option is loaded in the embodiment of the method three of multistage linking combobox;
Figure 11 shows the flow chart that option links in the embodiment of the method four of the invention for realizing multistage linking combobox.
Embodiment
The present invention is further illustrated below by the mode of embodiment, but does not therefore limit the present invention to the reality Apply among a scope.
First, the present invention proposes a kind of electronic device.
As shown in fig.1, it is the hardware structure schematic diagram of one embodiment of electronic device of the present invention.It is described in the present embodiment Electronic device 2 be it is a kind of can be automatic to carry out numerical computations and/or information processing according to the instruction for being previously set or storing Equipment.For example, it may be smart mobile phone, tablet computer, laptop, desktop computer, rack-mount server, blade type take It is engaged in device, tower server or Cabinet-type server (including independent server, or the server set that multiple servers are formed Group) etc..As shown in the figure, the electronic device 2 includes at least, but it is not limited to, connection storage can be in communication with each other by system bus Device 21, processor 22, network interface 23 and the system 20 for realizing multistage linking combobox.Wherein:
The memory 21 includes at least a type of computer-readable recording medium, and the readable storage medium storing program for executing includes Flash memory, hard disk, multimedia card, card-type memory (for example, SD or DX memories etc.), random access storage device (RAM), it is static with Machine access memory (SRAM), read-only storage (ROM), electrically erasable programmable read-only memory (EEPROM), it is programmable only Read memory (PROM), magnetic storage, disk, CD etc..In certain embodiments, the memory 21 can be the electricity The internal storage unit of sub-device 2, such as the hard disk or memory of the electronic device 2.In further embodiments, the memory 21 can also be the plug-in type hard disk being equipped with the External memory equipment of the electronic device 2, such as the electronic device 2, intelligence Storage card (Smart Media Card, SMC), secure digital (Secure Digital, SD) card, flash card (Flash Card) Deng.Certainly, the memory 21 can also both include the internal storage unit of the electronic device 2 or be set including its external storage It is standby.In the present embodiment, the memory 21 is installed on the operating system and types of applications of the electronic device 2 commonly used in storage Software, such as described program code of system 20 for realizing multistage linking combobox etc..In addition, the memory 21 can also be used In temporarily storing the Various types of data that has exported or will export.
The processor 22 can be in certain embodiments central processing unit (Central Processing Unit, CPU), controller, microcontroller, microprocessor or other data processing chips.The processor 22 is commonly used in the control electricity The overall operation of sub-device 2, such as perform and carry out data interaction or communicate relevant control and processing with the electronic device 2 Deng.In the present embodiment, the processor 22 is used to run the program code stored in the memory 21 or processing data, example The system 20 for realizing multistage linking combobox as described in running.
The network interface 23 may include radio network interface or wired network interface, which is commonly used in Communication connection is established between the electronic device 2 and other electronic devices.For example, the network interface 23 is used to incite somebody to action by network The electronic device 2 is connected with exterior terminal, between the electronic device 2 and exterior terminal establish data transmission channel and Communication connection etc..The network can be intranet (Intranet), internet (Internet), global system for mobile telecommunications system Unite (Global System of Mobile communication, GSM), wideband code division multiple access (Wideband Code Division Multiple Access, WCDMA), 4G networks, 5G networks, bluetooth (Bluetooth), Wi-Fi etc. is wireless or has Gauze network.
It is pointed out that Fig. 1 illustrate only the electronic device 2 with component 21-23, it should be understood that not It is required that implement all components shown, the more or less component of the implementation that can be substituted.
In the present embodiment, the system 20 for realizing multistage linking combobox being stored in memory 21 can be divided One or more program module is segmented into, one or more of program modules are stored in memory 21, and can be by one A or multiple processors (the present embodiment is processor 22) are performed, to complete the present invention.
For example, Fig. 2 shows the program module signal of 20 first embodiment of system for realizing multistage linking combobox Scheme, in the embodiment, the system 20 for realizing multistage linking combobox can be divided into database 201, load-on module 202 With interlocking module 203.Wherein, the program module alleged by the present invention is the series of computation machine program for referring to complete specific function Instruction segment, than program more suitable for describing the system 20 for realizing multistage linking combobox the holding in the electronic device 2 Row process.The concrete function of the program module 201-203 will specifically be introduced by being described below.
The database 201, is stored with least one option group, includes in option group described in every group and closed by level It is some options of arrangement;
The load-on module 202, for when the combobox page is accessed, by performing JS intercept methods by option group Array is changed into, then each array is loaded onto in corresponding combobox;
JS intercept methods described here refer to, using a kind of common wscript.exe JAVASCRIPT interceptions character string, commonly use The function of interception character string can be substr (start, length) or substring (start, stop);Its Middle start refers to the starting position for intercepting character string, and length refers to from the interception character string starting position length to be intercepted, Stop refers to the stop position (because js subscripts, since 0, actual stop position is stop-1) for intercepting character string.Assuming that to cut " bcd " in " abcde " is taken, the position of b is that the position of 2, d is 4 here, then code test.substr (2,3) can be passed through Or code test.substring (2,5) is realized.
The interlocking module 203, for the change events in previous stage combobox, matches to when prime combobox Include the array of previous stage combobox option, putting when prime combobox option in array is then obtained by JS intercept methods Enter described work as in prime combobox.
Change events described here refer to that there occurs the event that the option of some in combobox is selected.
Illustrated below exemplified by " school-institute-specialty " three-level linkage combobox is automatically generated using the system:
1st, option is put in order by hierarchical relationship, the hierarchical relationship can similar " level-one two level three-level " this type lattice The relation (can be divided into as needed more cross level) of formula, is specially " institute of school specialty " in this example, can have option Body is organized into the form of some groups of option groups as shown in Figure 3;Some groups of option groups put in order are stored in advance in system In the database on backstage.
2nd, when user accesses the page with combobox, system can be automatically by the corresponding loading automatically of the option in database Into corresponding combobox, specifically loaded using JS intercept methods, option group is changed into array, conversion process first As shown in figure 4, then each array is loaded onto in corresponding combobox, i.e. the array [university] of the first order is loaded onto under chopped-off head Draw in frame, the array [university, institute] of the second level is loaded onto in the combobox of the second level, and the array [institute, specialty] of the third level adds Be loaded onto in third level combobox, if the also array of next stage, and so on loaded.
3rd, user first clicks on chopped-off head combobox, shows that some universities (A universities, B universities, C universities etc.) select for user, When user have selected university of a certain institute, that is, trigger change events, it is assumed here that specifically chosen A universities;Then under the second level Draw frame can Auto-matching include the array of chopped-off head combobox option, be specially [A universities, A1 institutes], [A universities, A2 institutes], [A universities, A3 institutes] etc. is some to include some arrays of A universities, in foregoing some arrays are intercepted by JS intercept methods Institute's option is put into the combobox of the second level;When user clicks on second level combobox, only it can show that some A universities divide into Institute, is specially (as shown in Figure 5) such as A1 institutes, A2 institutes, A3 institutes.
In another example Fig. 6 shows that the program module of 20 second embodiment of system for realizing multistage linking combobox is shown It is intended to, in the embodiment, the load-on module 202 of the system 20 for realizing multistage linking combobox can also be further segmented To call submodule 2021, conversion submodule 2022 and loading submodule 2023.
The calling submodule 2021, for the option group when the combobox page is accessed, stored in called data storehouse Not;
The conversion submodule 2022, for intercepting each option in option group successively by JS intercept methods, and is pressed The option group is changed into some numbers arranged by hierarchical relationship by the transformation rule between default option group and array Group;
The loading submodule 2023, for each array to be loaded into corresponding combobox.
Example is connected, when user accesses the page with combobox, option group that system can be stored in automatic called data storehouse Not, the option in each option group is then intercepted by JS intercept methods successively, after the interception of option, according to the layer of the option Level is converted into the value of the array of the corresponding level, then each array is loaded onto to the highest level institute of its corresponding option included In corresponding combobox, i.e., when in array only include an option, then by the array be loaded onto the option level it is corresponding under Draw in frame, but when including two options in array, the level which is loaded onto to the higher option of wherein level corresponds to Combobox in.
For another example Fig. 7 shows that the program module of 20 3rd embodiment of system for realizing multistage linking combobox is shown It is intended to, in the embodiment, the interlocking module 203 of the system 20 for realizing multistage linking combobox can also be further segmented For judging submodule 2031, option acquisition submodule 2032, screening submodule 2033, interception submodule 2034 and output sub-module 2035。
The judging submodule 2031, for judging whether previous stage combobox occurs change events;
The option acquisition submodule 2032, before obtaining described in previous stage combobox pointed by change events Level-one combobox option;
The screening submodule 2033, for filtered out from the array being loaded onto in the prime combobox include it is described The array of previous stage combobox option;
The interception submodule 2034, works as prime for being intercepted by JS intercept methods included in the array filtered out Combobox option;
The output sub-module 2035, for by described in interception when prime combobox option is put into when in prime combobox Show.
Secondly, the present invention proposes a kind of method for realizing multistage linking combobox.
In embodiment one, as shown in figure 8, the method for realizing multistage linking combobox includes the following steps:
S1, structure database:At least one option group is stored with the database, is wrapped in option group described in every group Contain some options arranged by hierarchical relationship;
S2, loading option:When the combobox page is accessed, option group is changed into number by performing JS intercept methods Each array, is then loaded onto in corresponding combobox by group;
S3, option linkage display:Change events in previous stage combobox, include to when the matching of prime combobox There is the array of previous stage combobox option, then obtained by JS intercept methods in array and be put into institute when prime combobox option State when in prime combobox.
It should be noted that the option of identical quantity or varying number can be included in every group of option group, therefore, when When number of options is different in option group, the number of plies of level is with including the most single group of number of options during the hierarchical relationship is converged Number of options in the option group is corresponding.
Illustrated below exemplified by creating on the three-level linkage combobox of " school-institute-specialty ":
1st, school, institute and specialty are arranged by the relation of " level-one two level three-level " this level type format, is learned The corresponding level in school is level-one, and the corresponding level two level of institute, the corresponding level three-level of specialty, the option group after arrangement is as schemed Shown in 3, then the option group after arrangement is preserved in the database.
2nd, when having user to access the page with combobox, system is automatically by the choosing in the selection group in database The automatic correspondence of item is loaded into corresponding combobox, is specifically loaded using JS intercept methods, first converts option group Into array, for conversion process as shown in figure 4, then each array is loaded onto in corresponding combobox, i.e. the array of the first order is [big Learn] it is loaded onto in chopped-off head combobox, the array [University College] of the second level is loaded onto second level combobox, and so on.
3rd, user first clicks on chopped-off head combobox, shows that some universities (A universities, B universities, C universities etc.) select for user, When user have selected university of a certain institute, that is, trigger change events, it is assumed here that specifically chosen A universities;Then under the second level Draw frame can Auto-matching include the array of chopped-off head combobox option, be specially [A universities, A1 institutes], [A universities, A2 institutes], [A universities, A3 institutes] etc. is some to include some arrays of A universities, in foregoing some arrays are intercepted by JS intercept methods Institute's option is put into the combobox of the second level;When user clicks on second level combobox, only it can show that some A universities divide into Institute, is specially (as shown in Figure 5) such as A1 institutes, A2 institutes, A3 institutes.
In embodiment two, on the basis of embodiment one, as shown in figure 9, the building process of database is specific as follows:
Option in each option group, be ranked up by hierarchical relationship from high to low by S11 respectively;
S12, add identical group separator between the respective option group;
S13, in units of option group, identical option separator is added between the respective option;
S14, preserve each option, group separator and option separator into the respective field of database.
Example is connected, as shown in figure 3, total Options are ranked up by the form of school-institute-specialty, in Fig. 2, each group Time by the use of " carriage return " as group separator between not, and between each option of group using " space " alternatively separator, After putting in order, it can disposably imported into database, be automatically saved in the respective field of database, so as to subsequent load Shi Caiyong JS intercept methods obtain.
In embodiment three, on the basis of embodiment two, as shown in Figure 10, the loading of option specifically includes following step Suddenly:
S21, when the combobox page is accessed, the option group that is stored in called data storehouse;
S22, by JS intercept methods, the option in the respective option group is intercepted successively, by default option group and number The option group is changed into some arrays arranged by hierarchical relationship by the transformation rule between group;
Each array, be loaded into corresponding combobox by S23.
Transformation rule between the option group and array is as follows:
{A1、A2、......An}=[A1], [A1, A2] ... [An-1, An];
Wherein, { A1、A2、......AnRepresent set of option group, A1、A2、......AnRepresent in set of option group Comprising n option, n is positive integer, [A1], [A1, A2] ... [An-1, An] represent and the corresponding n number of n option Group.
Example is connected, is done by taking option of the loading by " school-institute-specialty " form collator in linking combobox in three-level as an example Illustrate:
The 1st, once the combobox page is accessed, the option group stored when the page loads in automatic called data storehouse;
2nd, by the order of option group as shown in Figure 3, option in the respective option group is intercepted successively and changes into array, such as Shown in Fig. 4, left side is option group, and right side is the array after corresponding conversion;
3rd, array is loaded into corresponding combobox, i.e., the first row array shown in Fig. 4 is loaded into first order drop-down In frame, secondary series array is loaded into the combobox of the second level, and the 3rd number of cases group is loaded into third level combobox.
In example IV, on the basis of embodiment three, as shown in figure 11, the linkage of option is especially by following step It is rapid to realize:
S31, judge whether previous stage combobox occurs change events, if performing step S32, performs this step if not S31;
S32, obtain the previous stage combobox option pointed by change events described in previous stage combobox;
S33, filter out from the array being loaded onto in the prime combobox and include the previous stage combobox option Array;
S34, by JS intercept methods, intercept included in the array filtered out when prime combobox option;
S35, by described in interception when prime combobox option is put into when in prime combobox.
Example is connected, is illustrated by exemplified by three-level linkage combobox selection school, institute, specialty:
1st, first order combobox is clicked on, that is, selects the combobox of school, selects A schools (as shown in Figure 5) here;
2nd, recognize chosen in first order combobox be A schools after, from array of the loading in the combobox of the second level All arrays for including A schools are filtered out, that is, filter out the number that first value in the secondary series array shown in Fig. 4 is A schools Group;
3rd, second value in the secondary series array filtered out, i.e. second level combobox are intercepted successively by JS intercept methods Option, by these second level, combobox option is put into the combobox of the second level, to realize when the second level combobox is triggered When, it can only show these and relevant institute of A schools, the i.e. linkage of implementation options in the second level combobox.
Foregoing illustrates only the option between first order combobox and second level combobox to link, afterwards second level combobox Option linkage between third level combobox is same as above, and details are not described herein again.
In addition, a kind of computer-readable recording medium of the present invention, it is more which contains realization The system 20 of level linkage combobox, when this realizes that the system 20 of multistage linking combobox can be executed by one or more processors, Realize the operation of the above-mentioned method or electronic device for realizing multistage linking combobox.
Although the embodiment of the present invention is the foregoing described, it will be appreciated by those of skill in the art that this is only For example, protection scope of the present invention is to be defined by the appended claims.Those skilled in the art without departing substantially from On the premise of the principle of the present invention and essence, various changes or modifications can be made to these embodiments, but these changes and Modification each falls within protection scope of the present invention.

Claims (10)

  1. A kind of 1. method for realizing multistage linking combobox, it is characterised in that include the following steps:
    S1, structure database:At least one option group is stored with the database, is included in option group described in every group Some options arranged by hierarchical relationship;
    S2, loading option:When the combobox page is accessed, option group is changed into array by performing JS intercept methods, Then each array is loaded onto in corresponding combobox;
    S3, option linkage display:Change events in previous stage combobox, to before the matching of prime combobox includes The array of level-one combobox option, then by JS intercept methods obtain in array when prime combobox option be put into it is described ought In prime combobox.
  2. 2. the method according to claim 1 for realizing multistage linking combobox, it is characterised in that step S1 specifically include with Under step by step:
    Option in each option group, be ranked up by hierarchical relationship from high to low by S11 respectively;
    S12, add identical group separator between the respective option group;
    S13, in units of option group, identical option separator is added between the respective option;
    S14, preserve each option, group separator and option separator into the respective field of database.
  3. 3. the method according to claim 2 for realizing multistage linking combobox, it is characterised in that option group described in every group In include the option of identical quantity or varying number, the number of plies of level and include number of options most in the hierarchical relationship Number of options in option group described in more single groups is corresponding.
  4. 4. the method according to claim 2 for realizing multistage linking combobox, it is characterised in that step S2 specifically include with Under step by step:
    S21, when the combobox page is accessed, the option group that is stored in called data storehouse;
    S22, by JS intercept methods, intercept the option in the respective option group successively, by default option group and array it Between transformation rule by the option group change into by hierarchical relationship arrange some arrays;
    Each array, be loaded into corresponding combobox by S23.
  5. 5. the method according to claim 4 for realizing multistage linking combobox, it is characterised in that the option group and number Transformation rule between group is as follows:
    {A1、A2、......An}=[A1], [A1, A2] ... [An-1, An];
    Wherein, { A1、A2、......AnRepresent set of option group, A1、A2、......AnRepresent to include in set of option group N option, n is positive integer, [A1], [A1, A2] ... [An-1, An] represent and the corresponding n array of n option.
  6. 6. the method according to claim 5 for realizing multistage linking combobox, it is characterised in that step S3 specifically include with Under step by step:
    S31, judge whether previous stage combobox occurs change events, if performing step S32, performs this step S31 if not;
    S32, obtain the previous stage combobox option pointed by change events described in previous stage combobox;
    S33, filter out the array for including the previous stage combobox option from the array being loaded onto in the prime combobox;
    S34, by JS intercept methods, intercept included in the array filtered out when prime combobox option;
    S35, by described in interception when prime combobox option is put into when in prime combobox.
  7. 7. a kind of electronic device, including memory and processor, it is characterised in that being stored with the memory can be by the place The system for realizing multistage linking combobox that device performs is managed, the system for realizing multistage linking combobox includes:
    Database, is stored with least one option group in the database, includes in option group described in every group by level Some options of relation arrangement;
    Load-on module, for when the combobox page is accessed, option group to be changed into array by performing JS intercept methods, Then each array is loaded onto in corresponding combobox;
    Interlocking module, for the change events in previous stage combobox, to when the matching of prime combobox include it is previous Level combobox option array, then by JS intercept methods obtain array in when prime combobox option be put into it is described currently In level combobox.
  8. 8. electronic device according to claim 7, it is characterised in that the load-on module specifically includes:
    Submodule is called, for the option group when the combobox page is accessed, stored in called data storehouse;
    Submodule is converted, for intercepting each option in option group successively by JS intercept methods, and presses default option group The option group is changed into some arrays arranged by hierarchical relationship by the transformation rule not between array;
    Submodule is loaded, for each array to be loaded into corresponding combobox.
  9. 9. electronic device according to claim 7, it is characterised in that the interlocking module specifically includes:
    Judging submodule, for judging whether previous stage combobox occurs change events;
    Option acquisition submodule, for obtaining the previous stage combobox choosing described in previous stage combobox pointed by change events ;
    Submodule is screened, includes the previous stage combobox for being filtered out from the array being loaded onto in the prime combobox The array of option;
    Submodule is intercepted, for being intercepted by JS intercept methods included in the array filtered out when prime combobox option;
    Output sub-module, for will show described in interception when prime combobox option is put into when in prime combobox.
  10. 10. a kind of computer-readable recording medium, it is characterised in that it is more that the computer-readable recording medium memory contains realization Level linkage combobox system, the system for realizing multistage linking combobox can performed by least one processor so that At least one processor performs the step of the method for realizing multistage linking combobox as any one of claim 1-6 Suddenly.
CN201711210184.4A 2017-11-24 2017-11-24 Realize method, electronic device and the storage medium of multistage linking combobox Pending CN108038142A (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201711210184.4A CN108038142A (en) 2017-11-24 2017-11-24 Realize method, electronic device and the storage medium of multistage linking combobox
PCT/CN2018/083076 WO2019100645A1 (en) 2017-11-24 2018-04-13 Method for realizing multilevel interactive drop-down box, electronic device, and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201711210184.4A CN108038142A (en) 2017-11-24 2017-11-24 Realize method, electronic device and the storage medium of multistage linking combobox

Publications (1)

Publication Number Publication Date
CN108038142A true CN108038142A (en) 2018-05-15

Family

ID=62093030

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201711210184.4A Pending CN108038142A (en) 2017-11-24 2017-11-24 Realize method, electronic device and the storage medium of multistage linking combobox

Country Status (2)

Country Link
CN (1) CN108038142A (en)
WO (1) WO2019100645A1 (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110221745A (en) * 2019-05-30 2019-09-10 贝壳技术有限公司 For the generation method and device of the multi-layer drop-down choice box of asynchronous data
CN110377851A (en) * 2019-06-18 2019-10-25 平安科技(深圳)有限公司 Implementation method, device and the computer equipment of multistage linking combobox
WO2019232957A1 (en) * 2018-06-04 2019-12-12 平安科技(深圳)有限公司 Operational risk linkage method and system, computer device, and storage medium
CN110750581A (en) * 2019-09-24 2020-02-04 贝壳技术有限公司 Data display method and device of table component, storage medium and electronic equipment
CN111813789A (en) * 2020-06-03 2020-10-23 新奥数能科技有限公司 Data configuration method and device, computer readable storage medium and electronic equipment
CN115981624A (en) * 2022-12-26 2023-04-18 广东保伦电子股份有限公司 WPF-based drop-down box control element screening method and server

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030105765A1 (en) * 2001-03-19 2003-06-05 Smith Ian E. Represented object groups
CN103279525A (en) * 2013-05-29 2013-09-04 浙江搜车客网络技术有限公司 Multi-condition linkage searching method based on Hash optimization
CN105488123A (en) * 2015-11-23 2016-04-13 国云科技股份有限公司 Method for quickly loading multi-level drop-down selection and linkage box
CN106033471A (en) * 2015-03-20 2016-10-19 阿里巴巴集团控股有限公司 Method and device for processing form

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104991778B (en) * 2015-07-15 2018-10-02 北京京东尚科信息技术有限公司 Filter method based on tree structure and device

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030105765A1 (en) * 2001-03-19 2003-06-05 Smith Ian E. Represented object groups
CN103279525A (en) * 2013-05-29 2013-09-04 浙江搜车客网络技术有限公司 Multi-condition linkage searching method based on Hash optimization
CN106033471A (en) * 2015-03-20 2016-10-19 阿里巴巴集团控股有限公司 Method and device for processing form
CN105488123A (en) * 2015-11-23 2016-04-13 国云科技股份有限公司 Method for quickly loading multi-level drop-down selection and linkage box

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
王建兴: "基于数据库的多级联动菜单的实现", 《山东理工大学学报(自然科学版)》 *

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2019232957A1 (en) * 2018-06-04 2019-12-12 平安科技(深圳)有限公司 Operational risk linkage method and system, computer device, and storage medium
CN110221745A (en) * 2019-05-30 2019-09-10 贝壳技术有限公司 For the generation method and device of the multi-layer drop-down choice box of asynchronous data
CN110377851A (en) * 2019-06-18 2019-10-25 平安科技(深圳)有限公司 Implementation method, device and the computer equipment of multistage linking combobox
WO2020253059A1 (en) * 2019-06-18 2020-12-24 平安科技(深圳)有限公司 Method and apparatus for implementing multi-stage linkage drop-down box, and computer device
CN110377851B (en) * 2019-06-18 2024-02-02 平安科技(深圳)有限公司 Method and device for realizing multi-stage linkage drop-down frame and computer equipment
CN110750581A (en) * 2019-09-24 2020-02-04 贝壳技术有限公司 Data display method and device of table component, storage medium and electronic equipment
CN111813789A (en) * 2020-06-03 2020-10-23 新奥数能科技有限公司 Data configuration method and device, computer readable storage medium and electronic equipment
CN111813789B (en) * 2020-06-03 2024-04-19 新奥数能科技有限公司 Data configuration method, device, computer readable storage medium and electronic equipment
CN115981624A (en) * 2022-12-26 2023-04-18 广东保伦电子股份有限公司 WPF-based drop-down box control element screening method and server

Also Published As

Publication number Publication date
WO2019100645A1 (en) 2019-05-31

Similar Documents

Publication Publication Date Title
CN108038142A (en) Realize method, electronic device and the storage medium of multistage linking combobox
CN107967159A (en) The method and server of a kind of profileapplied
CN110377851A (en) Implementation method, device and the computer equipment of multistage linking combobox
CN102902576B (en) Method, server and system for rendering webpages
CN106886544A (en) A kind of data processing method and device
CN104243590A (en) Resource object recommendation method and device
CN109636306A (en) Node-flow shifting method, device, terminal and storage medium
CN107885767A (en) A kind of page operation method and device
CN103581111A (en) Communication method and system
CN105991478A (en) Server resource distribution method and system
CN105553968A (en) Method and device for realizing login by multiple accounts
CN107807935B (en) Using recommended method and device
CN108021621A (en) Database data acquisition method, application server and computer-readable recording medium
CN108200196A (en) Data storage, querying method and system based on distributed structure/architecture
CN106844288A (en) A kind of random string generation method and device
CN104424240A (en) Multi-table correlation method and system, main service node and computing node
CN106020891A (en) Page loading method and device
CN106815274A (en) Daily record data method for digging and system based on Hadoop
CN112860412B (en) Service data processing method and device, electronic equipment and storage medium
CN106326403A (en) Web page generating method and device
CN106649320B (en) rectangular tree graph processing method and device
CN109309858B (en) Display method, device, equipment and medium of mutually exclusive icon
CN106066874A (en) Object processing method and terminal
CN107122463A (en) File saving method and device
CN106034119A (en) Encryption mixing method and device for application installation package

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20180515