Summary of the invention
What the embodiment of the present invention solved is how to choose the data in Web form easily.
For solving the problem, embodiments provide a kind of choosing method of Web list data, described method comprises:
Judge whether the button preset is pressed;
When determining that described default button is pressed, and when the cell in described form is clicked, judge in described form, whether data with existing is selected;
When determining have data selected in described form, according to the described button preset be pressed, choose corresponding data in described form;
When determining that described default button is not pressed, described form is set to single choice state.
Alternatively, described when determining that described default button is pressed, and when the cell in described form is clicked, judge that in described form, whether data with existing is selected, comprising:
Judge whether the variable preset is greater than default threshold value;
When described variable is greater than described threshold value, determine that in described form, existing data line is selected, using described selected data line as the first row data;
When described variable equals default threshold value, determine do not have data selected in described form.
Alternatively, described default button is the first button, the second button or the 3rd button.
Alternatively, using the described cell chosen be expert in data as the second row data, described when determining have data selected in described form, according to described press preset button, choose corresponding data in described form, comprising:
When determining that described first button is pressed, judge whether described the first row data and described second row data are same data line;
When determining described the first row data and described second row data are same data lines, then described the first row data are set to unchecked state;
When determining described the first row data and described second row data are not same data lines, then described second row data are set to selected state.
Alternatively, using the described cell chosen be expert in data as the second row data, described when determining have data selected in described form, according to described press preset button, choose corresponding data in described form, comprising:
When determining that described second button is pressed, choose the data of described the first row data, described second line number all row according to this and between described the first row data and described second row data.
Alternatively, using the described cell chosen be expert in data as the second row data, described when determining have data selected in described form, according to described press preset button, choose corresponding data in described form, comprising:
When determining that described 3rd button is pressed, described the first row data are set to non-selected state;
Data in the cell chosen described in acquisition;
Travel through the data in other cells of the cell column chosen described in described form;
When the data in other cells described are identical with the data in the described cell chosen, choose the data that described second row data and other cells identical with the data in the described cell chosen are expert at.
Alternatively, described first button, the second button and the 3rd button are respectively Ctrl button, Shift button and Alt button.
The embodiment of the present invention also provides a kind of selecting device of web list data, and described device comprises:
First judging unit, judges whether the button preset is pressed;
Second judging unit, when determining that described default button is pressed, and when the cell in described form is clicked, judges in described form, whether data with existing is selected;
Data selecting unit, is suitable for when determining have data selected in described form, according to the described button preset be pressed, chooses corresponding data in described form;
Setting unit, is suitable for, when determining that described default button is not pressed, described form being set to single choice state.
Alternatively, described second judging unit comprises:
First judgment sub-unit, is suitable for judging whether the variable preset is greater than default threshold value;
First determines subelement, is suitable for when described variable is greater than described threshold value, determines that in described form, existing data line is selected, using described selected data line as the first row data;
Second determines subelement, is suitable for when described variable equals default threshold value, determines do not have data selected in described form.
Alternatively, described default button is the first button, the second button or the 3rd button.
Alternatively, using the described cell chosen be expert in data as the second row data, described data selecting unit comprises:
Second judgment sub-unit, is suitable for when determining that described first button is pressed, and judges whether described the first row data and described second row data are same data line;
3rd determines subelement, is suitable for when determining described the first row data and described second row data are same data lines, then described the first row data being set to unchecked state;
First chooses subelement, is suitable for when determining described the first row data and described second row data are not same data lines, then described second row data being set to selected state.
Alternatively, using the described cell chosen be expert in data as the second row data, described data selecting unit comprises:
Second chooses subelement, is suitable for when determining that described second button is pressed, and chooses the data of described the first row data, described second line number all row according to this and between described the first row data and described second row data.
Alternatively, using the described cell chosen be expert in data as the second row data, described data selecting unit comprises:
4th determines subelement, is suitable for, when determining that described 3rd button is pressed, described the first row data being set to non-selected state;
Obtain subelement, be suitable for the data in the cell chosen described in obtaining;
Traversal subelement, is suitable for the data traveled through in other cells of the cell column chosen described in described form;
3rd chooses subelement, is suitable for, when the data in other cells described are identical with the data in the described cell chosen, choosing the data that described second row data and other cells identical with the data in the described cell chosen are expert at.
Alternatively, described first button, the second button and the 3rd button are respectively Ctrl button, Shift button and Alt button.
Compared with prior art, technical scheme of the present invention has following advantage:
By using default button, when clicking the data of the row choosing in web form cell or described cell place, multirow data can be chosen simultaneously, make when selecting the data in web form, the selection operation of data in web form can be simplified, simple and easy to do, thus can improve the work efficiency of web form.
Embodiment
For solving the above-mentioned problems in the prior art, the technical scheme that the embodiment of the present invention adopts is by using the button preset, the data having some same alike result with the data clicked in the row or cell chosen can be chosen simultaneously, make when selecting the data in web form, can simplify the operation, simple and easy to do.
For enabling above-mentioned purpose of the present invention, feature and advantage more become apparent, and are described in detail specific embodiments of the invention below in conjunction with accompanying drawing.
Fig. 1 shows the process flow diagram of the choosing method of a kind of web list data in the embodiment of the present invention.The choosing method of web list data as shown in Figure 1, can comprise:
Step S101: judge whether the button preset is pressed.
When judged result is for being, step S102 ~ S103 can be performed, otherwise, then can perform step S104.
Step S102: when the cell in described form is clicked, judges in described form, whether data with existing is selected.
In concrete enforcement, when clicking the cell in described form, the data of the row at described cell place will be selected, and wherein, described cell can be the arbitrary cell in described row.
When judged result is for being, can step S103 be performed, otherwise, then do not perform any operation.
Step S103: according to the described button preset be pressed, choose corresponding data in described form.
In concrete enforcement, when described first button, the second button or the 3rd button are pressed, the corresponding data in described form can be selected, make choosing of the data in web form more convenient, be easy to operation.
Step S104: described form is set to single choice state.
In concrete enforcement, describedly described form is set to single choice state refers to: when data in form described in user click, only the data that the last time clicks are chosen, and the data clicked before are converted to unchecked state.
Fig. 2 shows the process flow diagram of the choosing method of the another kind of web list data in the embodiment of the present invention.The choosing method of web list data as shown in Figure 2, can comprise:
Step S201: judge whether the button preset is pressed.
In concrete enforcement, described default button can be the first button, the second button or the 3rd button, and described first button, the second button and the 3rd button can be respectively Ctrl button, Shift button and Alt button.
When judged result is for being, step S203 ~ S208 can be performed, otherwise, then can perform step S202.
Step S202: described form is set to single choice state.
In concrete enforcement, describedly described form is set to single choice state refers to: when data in form described in user click, only the data that the last time clicks are chosen, and the data clicked before are converted to unchecked state.
Step S203: when the cell in described form is clicked, judges whether the variable preset is greater than default threshold value.
In concrete enforcement, described design variables, may be used for recording the information of the mark of the row at user's institute's click data place in described web form.
Such as, when original state, described variable can equal described default threshold value, and described variable can equal-1.And when having data selected in web form, the value of described variable can equal the numbering that chosen data are expert at, and during as clicked the 15th row data in web form as user, the value of design variables just can equal 15.
When judged result is for being, can step S205 be performed, otherwise, then can perform step S204.
Step S204: determine do not have data selected in described form.
In concrete enforcement, described variable equals described default threshold value when original state, and when having data selected in web form, and the value of described variable will equal the numbering that chosen data are expert at.Therefore, when the value of described variable equals default threshold value, then can determine not yet have data selected in described web form.
Step S205: determine that in described form, existing data line is selected.
In concrete enforcement, due to when having data selected in web form, the value of described variable will equal the numbering that chosen data are expert at.Therefore, when the value of described variable is greater than default threshold value, then can determine that in described web form, data with existing is selected.
For the ease of distinguishing and describing, can using described selected data line as the first row data.
In concrete enforcement, when determining to have chosen the first row data in described form, different according to the button preset be pressed, following step S206, S207 or S208 can be performed respectively.
Step S206: when determining that Ctrl button is pressed, chooses corresponding data in described form.
Referring to shown in Fig. 2 a, when determining that described Ctrl button is pressed, step S206a ~ S206c can be performed.
Step S206a: judge whether described the first row data and described second row data are same data line.
Here it is pointed out that the data of the row at described cell place will be set to selected state when when clicking the cell in described web form.For convenience of description, can using the described data clicking the row at the cell place chosen as the second row data.
In concrete enforcement, when determining that described Ctrl button is pressed, by clicking the cell in described form, the data chosen can be converted to unchecked state, also unchecked data can be chosen.Therefore, in order to determine that user will choose data to be converted to unchecked state further, or unchecked data being converted to selected state, first-selected can judging whether described the first row data and described second row data are same data line.
When judged result is for being, can step S206b be performed, otherwise, then can perform step S206c.
Step S206b: described the first row data are set to unchecked state.
In concrete enforcement, when the first row data are identical with the second row data, then can show that described the first row data (or second row data) are selected.Now, by again clicking described the first row data, the first row data can be converted to unchecked state by original selected state.
Step S206c: described second row data are set to selected state.
In concrete enforcement, when determining described the first row data and described second row data are not same data lines, can determining that user click second row data are to choose the second row data, now, described second row data can be chosen.
Therefore, by described Ctrl button and the combination operation clicking the cell in form, unchecked data line in Web form can be chosen, or, the data in the Web form chosen can be converted to unchecked state.
In concrete enforcement, when determining that described Shift button is pressed, can step S207 be performed: when determining that described Shift button is pressed, choosing corresponding data in described form.
Particularly, when determining that described Shift button is pressed, can by described the first row data, the second row data at described cell place and between described the first row data and described second row data the data of all row choose
Such as, when the first row data are the 15th row data, and when Shift button is pressed, clicked any one cell in the 20th row in described form by right mouse button, just all data of the 15th row ~ 20 row in described form all can be chosen.
Therefore, by Shift button and the combination operation clicking cell, not only can choose the first row data and the second row data clicking and choose, all data between the first row data and the second row data can also be chosen simultaneously.
In concrete enforcement, when determining that described Alt button is pressed, can step S208 be performed: when determining that described Shift button is pressed, choosing corresponding data in described form.
Referring to shown in Fig. 2 b, when determining that described Alt button is pressed, step S208a ~ S208c can be performed.
Step S208a: described the first row data are set to non-selected state.
In concrete enforcement, when Alt button is pressed, if chosen the first row data before clicking the described cell in described form, no matter in described the first row data, whether the data being arranged in the cell of same row with described cell are identical with the described data clicking the cell chosen, and all first can will be converted to unchecked state.
Step S208b: the data in the cell chosen described in acquisition.
In concrete enforcement, by when Alt button is pressed, obtain the data clicked in the cell chosen, so that whether the data that can judge to be arranged in described cell the cell of same row in following step are identical with the described data clicking the cell chosen.
Step S208c: travel through the data in other cells of the cell column chosen described in described form.
In concrete enforcement, in order to determine that whether data that other and described cell be arranged in the cell of same row are identical with the described data clicking the cell chosen, other cells described in can first traveling through, with the data in other cells described in obtaining.
Step S208d: judge that whether the data in other cells described are identical with the data in the described cell chosen.
When judged result is for being, can step S208e be performed, otherwise, then terminate.
Step S208e: choose the data that described second row data and other cells identical with the data in the described cell chosen are expert at.
In concrete enforcement, when the cell in described form and the described cell chosen of clicking are positioned at same row, and data in described cell identical with the described data clicked in the cell chosen time, just can choose all data in the row at described cell place.Otherwise when the data in described cell are not identical with the described data clicked in the cell chosen, all data in the row at other cell places described then can not be selected.
In concrete enforcement, by Alt button and the combination operation clicking the cell in described form, just can be positioned at identical row by described form with described cell, and the data that data in the cell cell identical with the described data clicked in the cell chosen is expert at are chosen.
Such as, when Alt button is pressed, when the data clicked in the cell chosen are " Zhang San ", if described cell and the described cell chosen of clicking are positioned at same row, and the data in described cell are when being also " Zhang San ", then the data of the full line at described cell place will be shown as the state chosen.Otherwise the data in the row at then described form place then can not be selected.
Fig. 3 shows the structural representation of the selecting device of a kind of web list data in the embodiment of the present invention.The selecting device of web list data as shown in Figure 3, can comprise the first judging unit 301, second judging unit 302, data selecting unit 303 and setting unit 304, wherein:
Described first judging unit 301, is suitable for judging whether the button preset is pressed.
Described second judging unit 302, is suitable for when determining that described default button is pressed, and when the cell in described form is clicked, judges in described form, whether data with existing is selected.
Described data selecting unit 303, is suitable for when determining have data selected in described form, according to the described button preset be pressed, chooses corresponding data in described form.
Described setting unit 304, is suitable for, when determining that described default button is not pressed, described form being set to single choice state.
Fig. 4 shows the structural representation of a kind of first judging unit in the embodiment of the present invention.The first judging unit 400 as shown in Figure 4, comprises the first judgment sub-unit 401, first and determines that subelement 403 determined by subelement 402 and second, wherein:
Described first judgment sub-unit 401, is suitable for when determining that described default button is pressed, and when the cell in described form is clicked, judges whether the variable preset is greater than default threshold value.
Described first determines subelement 402, is suitable for when described variable is greater than described threshold value, determines that in described form, existing data line is selected, using described selected data line as the first row data.
Described second determines subelement 403, is suitable for when described variable equals default threshold value, determines do not have data selected in described form.
In concrete enforcement, described default button can be the first button, the second button or the 3rd button.Described first button, the second button and the 3rd button are respectively Ctrl button, Shift button and Alt button.
In concrete enforcement, can using the described cell chosen be expert in data as the second row data.
Fig. 5 shows the structural representation of a kind of data selecting unit in the embodiment of the present invention.Data selecting unit 500 as shown in Figure 5, can comprise the second judgment sub-unit 501, the 3rd and determine that subelement 503 chosen by subelement 502 and described first, wherein:
Described second judgment sub-unit 501, is suitable for when determining that described first button is pressed, and judges whether described the first row data and described second row data are same data line.
Described 3rd determines subelement 502, is suitable for when determining described the first row data and described second row data are same data lines, then described the first row data being set to unchecked state.
Described first chooses subelement 503, is suitable for, when determining described the first row data and described second row data are not same data lines, described second row data being set to selected state.
In concrete enforcement, data selecting unit 500 as shown in Figure 5 can also comprise second and choose subelement 504, wherein:
Described second chooses subelement 504, is suitable for when determining that described second button is pressed, and chooses the data of described the first row data, described second line number all row according to this and between described the first row data and described second row data.
In concrete enforcement, data selecting unit 500 as shown in Figure 5 can also comprise the 4th and determine that subelement 508 chosen by subelement 505, acquisition subelement 506, traversal subelement 507 and the 3rd, wherein:
Described 4th determines subelement 505, is suitable for, when determining that described 3rd button is pressed, described the first row data being set to non-selected state.
Described acquisition subelement 506, is suitable for the data in the cell chosen described in obtaining.
Described traversal subelement 507, is suitable for the data traveled through in other cells of the cell column chosen described in described form.
Described 3rd chooses subelement 508, is suitable for, when the data in other cells described are identical with the data in the described cell chosen, choosing the data that described second row data and other cells identical with the data in the described cell chosen are expert at.
One of ordinary skill in the art will appreciate that all or part of step in the various methods of above-described embodiment is that the hardware that can carry out instruction relevant by program has come, this program can be stored in computer-readable recording medium, and storage medium can comprise: ROM, RAM, disk or CD etc.
Done detailed introduction to the method and system of the embodiment of the present invention above, the present invention is not limited to this.Any those skilled in the art, without departing from the spirit and scope of the present invention, all can make various changes or modifications, and therefore protection scope of the present invention should be as the criterion with claim limited range.