CN101799831A - Method and device for accumulating web page table data - Google Patents
Method and device for accumulating web page table data Download PDFInfo
- Publication number
- CN101799831A CN101799831A CN 201010133688 CN201010133688A CN101799831A CN 101799831 A CN101799831 A CN 101799831A CN 201010133688 CN201010133688 CN 201010133688 CN 201010133688 A CN201010133688 A CN 201010133688A CN 101799831 A CN101799831 A CN 101799831A
- Authority
- CN
- China
- Prior art keywords
- user
- page
- data
- javascript function
- columns
- 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
Links
Images
Landscapes
- Information Transfer Between Computers (AREA)
Abstract
The invention discloses a method and a device for accumulating web page table data. The method comprises the following steps: 1. using a JavaScript function in a web page to obtain the selection of a user so as to acquire the data required to be accumulated by the user in the web page table; 2. using the JavaScript function to traverse the data required to be accumulated by the user in the web page table, and accumulating; and 3. displaying the accumulation result to the user on the page. The invention can automatically accumulate the data required to be accumulated by the user based on the selection of the user, and displays the result to the user. The user can manually make calculation without using other computing tools, thereby facilitating the user to accumulate the web page table data.
Description
Technical field
The present invention relates to the internet web page technology, relate in particular to a kind of method and apparatus of accumulating web page table data.
Background technology
In generic web page was browsed, a lot of data all showed with form.When we wonder the total of certain delegation in the form or a certain column data, if original list data not to this row maybe these row make aggregate value output, we just must carry out manual calculations, data are drawn result of calculation one by one mutually, do very numerous and diverse like this and expend time in, particularly work as data more for a long time, this is a thing that is difficult to finish especially.Furthermore, even if each row and each row are made aggregate value output in the form, if we just hope know the value addition in certain several cell in the form as a result the time, we still need to carry out manual calculations inevitably, and also there is the possibility that there are errors in computation in manual calculations.
Summary of the invention
The method and apparatus that the purpose of this invention is to provide a kind of accumulating web page table data, it can realize user's adding up to the web page table data easily.
For achieving the above object, the present invention adopts following technical scheme:
A kind of method of accumulating web page table data comprises:
Step 1: in webpage, utilize the JavaScript function to obtain user's selection, to know that the user wants to carry out data accumulated in the page form;
Step 2: utilize that the user wants to carry out data accumulated in the JavaScript function traversal page form, and add up;
Step 3: on the page, accumulation result is shown to the user.
Preferred as technique scheme, described step 1 comprises:
Step 11: when the user wants to carry out adding up of data in certain row in the page form and/or certain row, utilize the row and column of JavaScript function traversal page form, draw the line number and the columns of page form;
Step 12: newly produce a page,, generate line number and columns radio control one to one, be presented in the new page, select for the user according to described line number and columns.
Preferred as technique scheme, described step 1 comprises:
Step 11 ': when user's selected at least one cell and when wanting that selected cell carried out data accumulation in page form, the cell that utilizes the JavaScript function that the user is selected copies in the shear plate of system and deposits;
Described step 2 is specially:
Step 21 ': utilize the data of depositing in the shear plate of JavaScript function reading system, these data then travel through and add up.
Preferred as technique scheme, described step 2 comprises step:
During ergodic data, judge whether currency is legal numerical value, if, then add up, if not, then skip.
A kind of device of accumulating web page table data comprises:
The user selects acquisition module, is used for utilizing the JavaScript function to obtain user's selection at webpage, to know that the user wants to carry out data accumulated in the page form;
Traversal and accumulator module are used for utilizing JavaScript function traversal page form user to want to carry out data accumulated, and add up;
Display module is used on the page accumulation result being shown to the user.
Preferred as technique scheme, described user selects acquisition module to comprise:
OK/and the columns acquisition module, be used for when the user wants to carry out adding up of data in capable and/or certain row of page form, utilizing the row and column of JavaScript function traversal page form, draw the line number and the columns of page form;
Select page generation module, be used for newly producing a page,, generate line number and columns radio control one to one, be presented in the new page, select for the user according to described line number and columns.
Preferred as technique scheme, described user selects acquisition module to comprise: the cell replication module, be used for when the user at selected at least one cell of page form and when wanting that selected cell carried out data accumulation, the cell that utilizes the JavaScript function that the user is selected copies in the shear plate of system and deposits;
Described traversal and accumulator module, the data that specifically are used for utilizing the shear plate of JavaScript function reading system to deposit, these data then travel through and add up.
Preferred as technique scheme, described traversal and accumulator module also comprise:
Judge module is used for when ergodic data, judges whether currency is legal numerical value, if, then add up, if not, then skip.
The method and apparatus of accumulating web page table data provided by the invention can be wanted the user to carry out data accumulated and add up, and the result is shown to the user automatically according to user's selection.The present invention need not the user and uses other computational tool manual calculations, has realized user's adding up to the web page table data easily.
Description of drawings
Below in conjunction with accompanying drawing the present invention is elaborated.
Fig. 1 is the schematic flow sheet of the method for accumulating web page table data of the present invention;
Fig. 2 is the schematic flow sheet of an embodiment of method shown in Figure 1;
Fig. 3 is the schematic flow sheet of another embodiment of method shown in Figure 1;
Fig. 4 is the structural representation of the device of accumulating web page table data of the present invention.
Embodiment
The invention provides a kind of method of accumulating web page table data, as shown in Figure 1, it comprises:
Step 1: in webpage, utilize the JavaScript function to obtain user's selection, to know that the user wants to carry out data accumulated in the page form;
Step 2: utilize that the user wants to carry out data accumulated in the JavaScript function traversal page form, and add up;
Step 3: on the page, accumulation result is shown to the user.
The method of accumulating web page table data of the present invention can be wanted the user to carry out data accumulated and add up, and the result is shown to the user automatically according to user's selection.The present invention need not the user and uses other computational tool manual calculations, has realized user's adding up to the web page table data easily.
Among the present invention, above-mentioned steps 1 and step 2 all are to use the JavaScript function to realize.JavaScript is a kind of based on object (Object) and event-driven (Event Driven) and script with security performance.The purpose of using it is to be implemented in a Web (webpage) page with HTML HTML (Hypertext Markup Language), java script language (Java small routine) to connect a plurality of objects, with the Web customer interactions, thereby can develop the application program etc. of client.
Because the user wants to carry out data that data accumulated both may be certain row and/or certain row in the web page table, also may be data in certain several cell wherein, therefore, at different situations, above-mentioned steps 1 can comprise:
Step 11: when the user wants to carry out adding up of data in certain row in the page form and/or certain row, utilize the row and column of JavaScript function traversal page form, draw the line number and the columns of page form;
Step 12: newly produce a page,, generate line number and columns radio control one to one, be presented in the new page, select for the user according to described line number and columns.
Perhaps, above-mentioned steps 1 comprises:
Step 11 ': when user's selected at least one cell and when wanting that selected cell carried out data accumulation in page form, the cell that utilizes the JavaScript function that the user is selected copies in the shear plate of system and deposits;
At this moment, accordingly, above-mentioned steps 2 is specially:
Step 21 ': utilize the data of depositing in the shear plate of JavaScript function reading system, these data then travel through and add up.
In addition, in order to ensure obtaining accumulation result accurately, above-mentioned steps 2 can comprise step among the present invention:
During ergodic data, judge whether currency is legal numerical value, if, then add up, if not, then skip.
Introduce the embodiment of the inventive method below in detail with two specific embodiments.
Embodiment one (data to certain row and/or certain row in the page form add up):
As shown in Figure 2, the step of present embodiment comprises:
Step 21: during browsing pages, if the user wants to carry out adding up of data in certain row in the page form and/or certain row, then the user clicks the pre-designed plug-in unit that adds up;
Step 22:, draw the line number and the columns of form with the row and column of form in the JavaScript function traversal page;
Step 23: newly produce a page,, generate line number and columns radio control one to one, be presented in the new page, select for the user according to described line number and columns;
Step 24: according to the selection that the user submits to, certain row of form and/or certain row (this certain row and/or certain row are row and/or the row that the user wants to carry out data accumulation) in the traversal page;
Step 25: judge whether to travel through and finish, if, then go to step 28, if not, then carry out next step;
Step 26: judge whether currency is legal numerical value (whether being numeral promptly), if, then carry out next step, if not, then skip;
Step 27: currency adds up;
Step 28: the specify labels place that accumulation result is presented at the page.
In the present embodiment, at first, provide a new page to the user, obtain the user and want to carry out the row of data accumulation and/or row, then, utilize the JavaScript function that data in described row and/or the row are traveled through and add up by the plug-in unit that adds up.
Embodiment two (data in some cell in the page form are added up):
As shown in Figure 3, the step of present embodiment comprises:
Step 31: during browsing pages, if the user wants the data in the plurality of units lattice are added up, then selected its of user wants to carry out the plurality of units lattice of data accumulation;
Step 32: the user clicks the pre-designed plug-in unit that adds up;
Step 33: use the JavaScript function, the data in the cell that the user is selected, the shear plate that copies to system is deposited;
Step 34: use the JavaScript function again, the data of depositing in the shear plate of reading system travel through these data more one by one;
Step 35: judge whether to travel through and finish, if, then go to step 38, if not, then carry out next step;
Step 36: judge whether currency is legal data (whether being numeral promptly), if, then carry out next step, if not, then skip;
Step 37: currency adds up;
Step 38: the specify labels place that accumulation result is presented at the page.
In the present embodiment, the user uses mouse or other instrument initiatively to select plurality of units lattice in the web page table, manually line of input or row, and then, the user clicks the plug-in unit that adds up, and carries out accumulating operation and the result is shown to the user.
Corresponding with the method for above-mentioned accumulating web page table data, the present invention also provides a kind of device of accumulating web page table data, and as shown in Figure 4, it comprises:
The user selects acquisition module 41, is used for utilizing the JavaScript function to obtain user's selection at webpage, to know that the user wants to carry out data accumulated in the page form;
Traversal and accumulator module 42 are used for utilizing JavaScript function traversal page form user to want to carry out data accumulated, and add up;
The device of accumulating web page table data of the present invention can be wanted the user to carry out data accumulated and add up, and the result is shown to the user automatically according to user's selection.The present invention need not the user and uses other computational tool manual calculations, has realized user's adding up to the web page table data easily.
Among the present invention, above-mentioned user selects acquisition module 41 to comprise:
OK/and the columns acquisition module, be used for when the user wants to carry out adding up of data in capable and/or certain row of page form, utilizing the row and column of JavaScript function traversal page form, draw the line number and the columns of page form;
Select page generation module, be used for newly producing a page,, generate line number and columns radio control one to one, be presented in the new page, select for the user according to described line number and columns.
Perhaps, above-mentioned user selects acquisition module 41 to comprise: the cell replication module, be used for when the user at selected at least one cell of page form and when wanting that selected cell carried out data accumulation, the cell that utilizes the JavaScript function that the user is selected copies in the shear plate of system and deposits;
At this moment, above-mentioned traversal and accumulator module 42, the data that specifically are used for utilizing the shear plate of JavaScript function reading system to deposit, these data then travel through and add up.
Preferably, above-mentioned traversal and accumulator module 42 can also comprise among the present invention:
Judge module is used for when ergodic data, judges whether currency is legal numerical value, if, then add up, if not, then skip.
The above is preferred embodiment of the present invention only, is not to be used for limiting practical range of the present invention; If do not break away from the spirit and scope of the present invention, the present invention is made amendment or is equal to replacement, all should be encompassed in the middle of the protection domain of claim of the present invention.
Claims (8)
1. the method for an accumulating web page table data is characterized in that, comprising:
Step 1: in webpage, utilize the JavaScript function to obtain user's selection, to know that the user wants to carry out data accumulated in the page form;
Step 2: utilize that the user wants to carry out data accumulated in the JavaScript function traversal page form, and add up;
Step 3: on the page, accumulation result is shown to the user.
2. method according to claim 1 is characterized in that, described step 1 comprises:
Step 11: when the user wants to carry out adding up of data in certain row in the page form and/or certain row, utilize the row and column of JavaScript function traversal page form, draw the line number and the columns of page form;
Step 12: newly produce a page,, generate line number and columns radio control one to one, be presented in the new page, select for the user according to described line number and columns.
3. method according to claim 1 is characterized in that,
Described step 1 comprises:
Step 11 ': when user's selected at least one cell and when wanting that selected cell carried out data accumulation in page form, the cell that utilizes the JavaScript function that the user is selected copies in the shear plate of system and deposits;
Described step 2 is specially:
Step 21 ': utilize the data of depositing in the shear plate of JavaScript function reading system, these data then travel through and add up.
4. according to the described method of arbitrary claim in the claim 1 to 3, it is characterized in that described step 2 comprises step:
During ergodic data, judge whether currency is legal numerical value, if, then add up, if not, then skip.
5. the device of an accumulating web page table data is characterized in that, comprising:
The user selects acquisition module, is used for utilizing the JavaScript function to obtain user's selection at webpage, to know that the user wants to carry out data accumulated in the page form;
Traversal and accumulator module are used for utilizing JavaScript function traversal page form user to want to carry out data accumulated, and add up;
Display module is used on the page accumulation result being shown to the user.
6. device according to claim 5 is characterized in that, described user selects acquisition module to comprise:
OK/and the columns acquisition module, be used for when the user wants to carry out adding up of data in capable and/or certain row of page form, utilizing the row and column of JavaScript function traversal page form, draw the line number and the columns of page form;
Select page generation module, be used for newly producing a page,, generate line number and columns radio control one to one, be presented in the new page, select for the user according to described line number and columns.
7. device according to claim 5 is characterized in that,
Described user selects acquisition module to comprise: the cell replication module, be used for when the user at selected at least one cell of page form and when wanting that selected cell carried out data accumulation, the cell that utilizes the JavaScript function that the user is selected copies in the shear plate of system and deposits;
Described traversal and accumulator module, the data that specifically are used for utilizing the shear plate of JavaScript function reading system to deposit, these data then travel through and add up.
8. according to the described device of arbitrary claim in the claim 5 to 7, it is characterized in that described traversal and accumulator module also comprise:
Judge module is used for when ergodic data, judges whether currency is legal numerical value, if, then add up, if not, then skip.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN 201010133688 CN101799831A (en) | 2010-03-15 | 2010-03-15 | Method and device for accumulating web page table data |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN 201010133688 CN101799831A (en) | 2010-03-15 | 2010-03-15 | Method and device for accumulating web page table data |
Publications (1)
Publication Number | Publication Date |
---|---|
CN101799831A true CN101799831A (en) | 2010-08-11 |
Family
ID=42595507
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN 201010133688 Pending CN101799831A (en) | 2010-03-15 | 2010-03-15 | Method and device for accumulating web page table data |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN101799831A (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106610774A (en) * | 2015-10-23 | 2017-05-03 | 北京国双科技有限公司 | Webpage table editing method and device |
CN111274781A (en) * | 2020-01-21 | 2020-06-12 | 北京三快在线科技有限公司 | Table display method and device, storage medium and electronic equipment |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20070162469A1 (en) * | 2005-12-30 | 2007-07-12 | Frank Kilian | Integrated software toolset for a web server |
CN101408840A (en) * | 2007-10-11 | 2009-04-15 | 沈阳金顶电子数字家庭技术有限公司 | Method for calling different browser objects |
-
2010
- 2010-03-15 CN CN 201010133688 patent/CN101799831A/en active Pending
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20070162469A1 (en) * | 2005-12-30 | 2007-07-12 | Frank Kilian | Integrated software toolset for a web server |
CN101408840A (en) * | 2007-10-11 | 2009-04-15 | 沈阳金顶电子数字家庭技术有限公司 | Method for calling different browser objects |
Non-Patent Citations (1)
Title |
---|
《电脑编程技巧与维护》 20091231 王德安等 静态网页中的数据表格操作 23~25 1-8 , 2 * |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106610774A (en) * | 2015-10-23 | 2017-05-03 | 北京国双科技有限公司 | Webpage table editing method and device |
CN106610774B (en) * | 2015-10-23 | 2020-03-31 | 北京国双科技有限公司 | Webpage table editing method and device |
CN111274781A (en) * | 2020-01-21 | 2020-06-12 | 北京三快在线科技有限公司 | Table display method and device, storage medium and electronic equipment |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN103164427B (en) | News Aggreagation method and device | |
KR101365862B1 (en) | Efficiently filtering using a web site | |
CN101382863B (en) | Page control shaft generating method and web page browser with the page control shaft | |
CN104239298B (en) | Text message recommends method, server, browser and system | |
KR20160061351A (en) | Automatically determining a size for a content item for a web page | |
CN101751223B (en) | Method and device for displaying dynamic data of webpage form | |
CN102819572B (en) | The display packing of catalogue data and system in document file management system | |
CA2602608A1 (en) | System and method of report rendering | |
KR101599815B1 (en) | Method and device for displaying interface | |
CN102637201A (en) | Webpage loading method based on asynchronous data transmission | |
CN103455405A (en) | Method and system for preventing button from being clicked repeatedly and method and system for unlocking button | |
CN105045464A (en) | Method and device for prompting of form filling progress | |
CN103377240A (en) | Information providing method, processing server and combination server | |
CN103377263A (en) | Business object screening method and business object screening device | |
CN101976394A (en) | Data acquiring and counting system and method | |
CN103034655B (en) | Collection method, system and the relevant device of a kind of user behavior information | |
CN101799831A (en) | Method and device for accumulating web page table data | |
CN102103581A (en) | Method and system for adding columns and rows to form by computer | |
CN102508884A (en) | Method and device for acquiring hotpot events and real-time comments | |
CN106815269A (en) | A kind of method for exhibiting data and device | |
CN102541947A (en) | Method and equipment for updating authority score of webpage based on friefox event | |
CN104077119A (en) | Page comparing method and page comparing device | |
CN102968252A (en) | Page backward/forward method and equipment | |
CN102981852B (en) | This commit method of long article and device | |
Krügel | The influence of scattering on the extinction of stars |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
C12 | Rejection of a patent application after its publication | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20100811 |