CN109657178A - Page table list processing method, device, computer equipment and storage medium - Google Patents
Page table list processing method, device, computer equipment and storage medium Download PDFInfo
- Publication number
- CN109657178A CN109657178A CN201811339106.9A CN201811339106A CN109657178A CN 109657178 A CN109657178 A CN 109657178A CN 201811339106 A CN201811339106 A CN 201811339106A CN 109657178 A CN109657178 A CN 109657178A
- Authority
- CN
- China
- Prior art keywords
- control
- title
- browser
- list
- committed
- 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.)
- Granted
Links
- 238000003672 processing method Methods 0.000 title claims abstract description 28
- 238000012545 processing Methods 0.000 claims description 24
- 238000004590 computer program Methods 0.000 claims description 17
- 238000012795 verification Methods 0.000 claims description 17
- 238000010200 validation analysis Methods 0.000 claims description 10
- 230000001965 increasing effect Effects 0.000 claims description 8
- 238000000605 extraction Methods 0.000 claims 1
- 238000000034 method Methods 0.000 abstract description 12
- 230000006870 function Effects 0.000 description 15
- 238000005516 engineering process Methods 0.000 description 4
- VYZAMTAEIAYCRO-UHFFFAOYSA-N Chromium Chemical compound [Cr] VYZAMTAEIAYCRO-UHFFFAOYSA-N 0.000 description 3
- 238000004458 analytical method Methods 0.000 description 3
- 238000011161 development Methods 0.000 description 3
- 238000010586 diagram Methods 0.000 description 3
- 230000000694 effects Effects 0.000 description 3
- 230000005540 biological transmission Effects 0.000 description 2
- 238000006243 chemical reaction Methods 0.000 description 2
- 238000012790 confirmation Methods 0.000 description 2
- 238000012217 deletion Methods 0.000 description 2
- 230000037430 deletion Effects 0.000 description 2
- 238000013507 mapping Methods 0.000 description 2
- 238000004364 calculation method Methods 0.000 description 1
- 230000010485 coping Effects 0.000 description 1
- 238000013461 design Methods 0.000 description 1
- 238000005538 encapsulation Methods 0.000 description 1
- 230000002708 enhancing effect Effects 0.000 description 1
- 238000009877 rendering Methods 0.000 description 1
- 230000003068 static effect Effects 0.000 description 1
- 230000001360 synchronised effect Effects 0.000 description 1
- 230000002123 temporal effect Effects 0.000 description 1
- 238000013519 translation Methods 0.000 description 1
Classifications
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02D—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
- Y02D10/00—Energy efficient computing, e.g. low power processors, power management or thermal management
Landscapes
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
- Information Transfer Between Computers (AREA)
Abstract
The invention discloses a kind of page table list processing method, device, computer equipment and storage mediums.The described method includes: obtaining the form controls in list to be committed if the version information of browser meets preset edition compatibility requirement;According to variation relation of the control title before and after dynamic setting in each browser version prestored in preset control data table, the control title of each form controls is checked, if the control title after the entitled dynamic setting of the control of form controls, then the attribute definition to the control title before dynamic setting will be replaced with to the attribute definition of the control title after dynamic setting in the form controls, obtains updated list to be committed;Updated list to be committed is parsed, and sends server-side for the form data that parsing obtains.Technical solution of the present invention avoids the parsing mistake of form data caused by control name changing, improves the compatibility to incompatible browser version.
Description
Technical field
The present invention relates to field of computer technology more particularly to a kind of page table list processing methods, device, computer equipment
And storage medium.
Background technique
With the continuous development of Internet technology, navigator product is not only many kinds of, but also version updating is frequent.Due to
Information technology updates rapidly, and new product is often difficult the design of compatible old product;Abandon some old software libraries, replace for
More efficient more succinct version, is that numerous navigator product providers have to the strategy taken, meanwhile, based on browser
Also in the new browser technology that constantly follows up, this is still to bring various compatibility to ask in the old Web system of military service for Web exploitation
Topic.
For example, many browser application pages provide the function of user information input, user passes through the browser application page
The input frame control of offer inputs relevant information, and browser is using the JavaScript script of local cache to application page
After Form list is parsed, the form data that parsing obtains is submitted to background server and is further processed.However,
In some application scenarios, the title of input frame control be not it is fixed, need the need by JavaScript script according to application
It is set dynamically, it is consistent with the title ensured with server-side is arranged.But since the compatibility between browser version is asked
Topic, for lowest version browser after being set dynamically by attribute value of the JavaScript script to control title, control
Part title can change, and cause server-side that can not get corresponding control value by the control title attribute value of agreement.
For example, to<input type=" text " name=" username " value=" zhangsan ">this input
Control, when by the order input.setAttribute of JavaScript script (' name', personname), dynamic changes
When the attribute value of the control title name of input control, in the browser version lower than IE8, which be will become
Submitname becomes < input type=" text " submitname=" personname " value=" zhangsan "
>, but since JavaScript script is still to parse according to original control title when parsing to the control, lead to nothing
Normal direction server-side transmits the form data of personname=" zhangsan ", and server-side is caused to pass through
Request.getParameter (" personname ") obtains form data failure.
Summary of the invention
The embodiment of the present invention provides a kind of forms pages processing method, device, computer equipment and storage medium, to solve
Control title changes when the attribute value of control title being set dynamically in lowest version browser, leads to form data
The problem of parsing mistake, server-side can not correctly obtain form data.
A kind of forms pages processing method, comprising:
If detecting, user triggers the operation that list is submitted by browser page, obtains the version letter of the browser
Breath;
If the version information meets preset edition compatibility requirement, the form controls in list to be committed is obtained;
According to control title in each browser version prestored in preset control data table before and after dynamic setting
Variation relation checks the control title of each form controls, if the entitled dynamic of the control of the form controls
Control name after the dynamic setting is referred to as by the control title after setting then using the form controls as control to be processed
Target widget title, and control name of the target widget title before dynamic setting is referred to as source control title;
The attribute definition of the target widget title will be replaced with to the source control title in the control to be processed
Attribute definition, obtain the updated list to be committed;
The updated list to be committed is parsed, and sends server-side for the form data that parsing obtains.
A kind of forms pages processing unit, comprising:
Version obtains module, if obtaining for detecting that user triggers the operation that list is submitted by browser page
The version information of the browser;
Control obtains module and obtains table to be committed if meeting preset edition compatibility requirement for the version information
Form controls in list;
Module is checked, for moving according to control title in each browser version prestored in preset control data table
The variation relation of state setting front and back, checks the control title of each form controls, if the control of the form controls
Control title after the entitled dynamic setting of part, then using the form controls as control to be processed, after the dynamic setting
Control name is referred to as target widget title, and control name of the target widget title before dynamic setting is referred to as source control
Part title;
Update module, for will replace with the attribute definition of the target widget title to institute in the control to be processed
The attribute definition for stating source control title obtains the updated list to be committed;
Parsing module, for being parsed to the updated list to be committed, and the form data that parsing is obtained
It is sent to server-side.
A kind of computer equipment, including memory, processor and storage are in the memory and can be in the processing
The computer program run on device, the processor realize above-mentioned forms pages processing method when executing the computer program
Step.
A kind of computer readable storage medium, the computer-readable recording medium storage have computer program, the meter
The step of calculation machine program realizes above-mentioned forms pages processing method when being executed by processor.
In above-mentioned forms pages processing method, device, computer equipment and storage medium, if detecting, user passes through browsing
The device page triggers the operation that list is submitted, then obtains the version information of browser, and meet preset version in the version information
When compatibility requirements, according to control title in each browser version prestored in preset control data table before and after dynamic setting
Variation relation, the control title for treating the form controls in submission form is checked, if the control of form controls is entitled
Control title after dynamic setting, then according to the variation relation prestored in control data table, by the form controls to dynamically setting
The attribute definition of the control title postponed replaces with the attribute definition to the control title before dynamic setting, obtain it is updated to
Submission form, so that can accurately parse form data when being parsed to updated list to be committed and be sent to
Server-side realizes when the attribute value of control title being set dynamically in incompatible browser version, evades control
The parsing of form data caused by name changing mistake mentions so that server-side can correctly and easily obtain form data
Compatibility of the height to incompatible browser version.Meanwhile so that old Web system does not need to redesign exploitation, section
Development cost is saved.
Detailed description of the invention
In order to illustrate the technical solution of the embodiments of the present invention more clearly, below by institute in the description to the embodiment of the present invention
Attached drawing to be used is needed to be briefly described, it should be apparent that, the accompanying drawings in the following description is only some implementations of the invention
Example, for those of ordinary skill in the art, without any creative labor, can also be according to these attached drawings
Obtain other attached drawings.
Fig. 1 is an application environment schematic diagram of page table list processing method in one embodiment of the invention;
Fig. 2 is a flow chart of page table list processing method in one embodiment of the invention;
Fig. 3 is a flow chart of step S4 in page table list processing method in one embodiment of the invention;
Fig. 4 is the version information that browser is obtained in the step S1 of page table list processing method in one embodiment of the invention
One flow chart;
Fig. 5 is a flow chart of step S5 in page table list processing method in one embodiment of the invention;
Fig. 6 is a schematic diagram of page table list processing unit in one embodiment of the invention;
Fig. 7 is a schematic diagram of computer equipment in one embodiment of the invention.
Specific embodiment
Following will be combined with the drawings in the embodiments of the present invention, and technical solution in the embodiment of the present invention carries out clear, complete
Site preparation description, it is clear that described embodiments are some of the embodiments of the present invention, instead of all the embodiments.Based on this hair
Embodiment in bright, every other implementation obtained by those of ordinary skill in the art without making creative efforts
Example, shall fall within the protection scope of the present invention.
Page table list processing method provided by the present application, can be applicable in application environment as shown in Figure 1, the application environment
Including server-side and client, wherein be attached between server-side and client by network, which can be wired network
Network or wireless network, client are specifically including but not limited to various personal computers, laptop, smart phone and plate
Computer and portable wearable device, the server that server-side can specifically be formed with independent server or multiple servers
Cluster is realized.Client treats submission form according to the version information of browser and carries out compatible processing, and by the table after parsing
Forms data is sent to server-side, so that server-side can correctly obtain form data.
In one embodiment, it as shown in Fig. 2, providing a kind of page table list processing method, applies in Fig. 1 in this way
It is illustrated for client, details are as follows:
S1: if detecting, user triggers the operation that list is submitted by browser page, obtains the version letter of browser
Breath.
Specifically, it in the scene for the input control input relevant information that user provides according to browser page, for example steps on
The page is recorded after perhaps enrollment page user inputs log-on message or registration information in input control, clicks corresponding submission
When button, i.e., the operation that triggering list is submitted obtains the version of browser when client detects the operation that the triggering list is submitted
This information.
The version information of browser is navigator product provider to inform that the currently used browser of user is provided
Function relevant information.For example, the version information of the IE11 browser of Microsoft is IE11.1198.14393.0, Google
The version information of the Chrome browser of company is Chrome69.0.3497.100, the version information for the browser Firefox that increases income
For Firefox61.0.2.Wherein, the major release of the digital representation current browser before first decimal point, major release
It is that the primary identity information of a certain function whether is supported for distinguishing browser.
The version information for obtaining browser can be realized by executing preset JavaScript script.JavaScript
Script is a kind of literal translation formula scripting language, is a kind of regime type, weak type, the language based on prototype, built-in support type.It
Interpreter be referred to as JavaScript engine, as a part of browser, client is widely used in, commonly used in giving
Html web page increases dynamic function.
S2: if the version information of browser meets preset edition compatibility requirement, the list in list to be committed is obtained
Control.
Specifically, preset edition compatibility requires to be for judging it is to need to carry out the list to be committed of current browser
The foundation of compatibility processing.For example, preset edition compatibility requires to can be the browser version lower than IE8.
According to the version information of the step S1 current browser got, it is preset to judge whether the version information meets
Edition compatibility requirement, by taking edition compatibility requirement is lower than the browser version of IE8 as an example, if the version number of current browser is
IE6 then confirms that the version information of the browser meets the preset edition compatibility requirement, and obtains the list in list to be committed
Control.
List to be committed specifically can be Form list, data acquisition function is mainly responsible in webpage, usually by table
Single label, form fields and three, list button part form, wherein contained in form fields text box, password box, check box,
Radio box, drop-down choice box and file upload the form controls such as frame.Each form controls includes control type, control title and control
Part value.For example,<input type=" text " name=" username " value=" zhangsan ">is text box input
Control, wherein control type text, the entitled username of control, control value are zhangsan.
S3: according to control title in each browser version prestored in preset control data table before and after dynamic setting
Variation relation, the control title of each form controls is checked, if after the entitled dynamic setting of the control of form controls
Control title control name after dynamic setting is referred to as target widget name then using the form controls as control to be processed
Claim, and control name of the target widget title before dynamic setting is referred to as source control title.
Specifically, after user inputs relevant information by the input frame control that the browser application page provides, client
Browser the Form list of application page is parsed using the JavaScript script of local cache, and parsing is obtained
Form data be submitted to server-side and be further processed.Due in application scenes, the control name of input frame control
Claim not being fixed, needs to need to carry out dynamic to the attribute value of control title to set according to application by JavaScript script
It sets, it is consistent with the title ensured with server-side is arranged.But because the compatibility issue between browser version, will lead to certain
In the browser of lowest version, after being set dynamically by attribute value of the JavaScript script to control title, control name
Title changes.Control title is dynamically being set in the as different browser versions pre-saved in preset control data table
Set the variation relation of front and back, i.e. control title before the attribute value of dynamic setting control title and dynamic setting control title
Control name after attribute value be referred to as between mapping relations.
It should be understood that may include version information, control type, the category that control title is set dynamically in control data table
Property value before control title, and fields such as control title after the attribute value of dynamic setting control title.
For example, to<input type=" text " name=" username " value=" zhangsan ">this input
Control, in IE6 version when the attribute value of name is set dynamically, control title name will become submitname, i.e. input
Control becomes<input type="text"submitname="personname"value="zhangsan">, therefore,
The mapping relations between control the title name and submitname of IE6 version input control are preserved in control data table, i.e.,
The data record of control data table can be as shown in the table:
The corresponding data record of version information that current browser is inquired in preset control data table, by control number
According to this field of control title after the attribute value of dynamic setting control title in table as aiming field, in the number inquired
According to the value for obtaining aiming field in record, by being traversed to each form controls, if being wrapped in the data record inquired
Control type containing the form controls then further checks the value in the corresponding aiming field of control type of the form controls
In, if there are the control titles of form controls, if there are the control names of form controls in the value of the aiming field got
Claim, then the control title using the form controls as control to be processed, by the control title of the form controls, that is, after being set dynamically
As target widget title, and the record in the data record that control data table inquires, where target widget title
The value of control title this field before the middle attribute value for obtaining dynamic setting control title, as source control title.
It should be noted that if the control title of each form controls do not inquired in control data table it is corresponding
Record, then confirmation treats submission form and does not need to carry out compatible processing, treats submission form in directly execution step S5 and is solved
Analysis and the treatment process sent.
S4: the attribute of source control title is determined by being replaced in control to be processed to the attribute definition of target widget title
Justice obtains updated list to be committed.
Specifically, the source control title and target widget title determined according to step S3, will be original in control to be processed
The attribute definition of target widget title is deleted, and is replaced using the attribute definition to source control title, to be committed
After each of list China control to be processed completes the replacement processing of attribute definition, updated list to be committed is obtained.
For example, if control to be processed is < input type=" text " submitname=" personname " value=
" zhangsan " >, wherein submitname is target widget title, this then is waited locating by the corresponding entitled name of source control
It manages in control and the attribute definition submitname=" personname " of submitname is deleted, and use name=
" personname " is replaced, and the control to be processed is updated to < input type in obtained updated list to be committed
=" text " name=" personname " value=" zhangsan " >.
S5: parsing updated list to be committed, and sends server-side for the form data that parsing obtains.
In the present embodiment, the updated list to be committed obtained according to step S4 parses the list to be committed,
The value for obtaining each control in the list to be committed, obtains the form data of key-value form, and submit to server-side.Its
In, key is control title, and value is the attribute value of control title.
Such as: to<input type=" text " name=" username " value=" zhangsan ">this control
Control value obtained after parsing are as follows: username=zhangsan.
In the present embodiment, if detecting, user triggers the operation that list is submitted by browser page, obtains browser
Version information prestored according in preset control data table and when the version information meets preset edition compatibility requirement
Each browser version in variation relation of the control title before and after dynamic setting, treat the form controls in submission form
Control title is checked, if the control title after the entitled dynamic setting of the control of form controls, according to control data table
In the variation relation that prestores, the attribute definition of the control title after dynamic setting will be replaced with to dynamically setting in the form controls
The attribute definition of control title before setting obtains updated list to be committed so as to updated list to be committed into
When row parsing, it can accurately parse form data and be sent to server-side, it is right in incompatible browser version to realize
When the attribute value of control title is set dynamically, evade the parsing mistake of form data caused by control name changing, to make
Form data can correctly and easily be obtained by obtaining server-side, improve the compatibility to incompatible browser version.Meanwhile
So that old Web system does not need to redesign exploitation, development cost is saved.
In one embodiment, as shown in figure 3, in step s 4, by control to be processed to the attribute of target widget title
Definition replaces with the attribute definition to source control title, obtains updated list to be committed, specifically comprises the following steps:
S41: in control to be processed, the attribute value of target widget title is obtained, and delete the category to target widget title
Property definition.
Specifically, in control to be processed, the category of target widget title is obtained from the attribute definition of target widget title
Property value, and the attribute value is subjected to temporal cache, meanwhile, delete to the attribute definition of target widget title.
For example, right<input type="text"submitname="personname"value="zhangsan">
This input control to be processed, submitname target widget title, the corresponding entitled name of source control.For
In JavaScript script, input.removeAttribute (' submitname') can be used and delete to target widget name
Claim the attribute definition of submitname, control to be processed after deletion are as follows: < input type=" text " value=
" zhangsan " >, meanwhile, cache the attribute value personname of submitname.
S42: the attribute definition to preset basic control title is increased newly in control to be processed, by target widget title
Attribute value is assigned to basic control title.
Specifically, it on the basis of the attribute definition of delete target control title, increases newly to preset basic control title
Attribute definition, using the attribute value of the step S41 target widget title cached as basic control title in the attribute definition
Attribute value.
Continuation is illustrated by taking the control to be processed of the input in step S42 as an example, the control to be processed after deletion are as follows: <
Input type=" text " value=" zhangsan " >, if the preset basis entitled title of control, uses
The newly-increased attribute definition to title of input.setAttribute (' title', personname), by personname assignment
Control to be processed to title, as the attribute value of title, after increasing newly are as follows: < input type=" text " title=
" personname " value=" zhangsan " >.
S43: the basic control title in control to be processed is replaced with into source control title.
Specifically, on the basis of increasing the attribute definition to basic control title newly, by the basis, control title is replaced with
Source control title.
Continuation is illustrated by taking the control to be processed of the input in step S43 as an example, the control to be processed after increasing newly are as follows: <
Input type=" text " title=" personname " value=" zhangsan " >, title is replaced with into source control name
Claim name, then the replaced control to be processed are as follows: < input type=" text " name=" personname " value=
“zhangsan”>。
In the present embodiment, by obtaining the attribute value of target widget title in control to be processed, and delete to target control
The attribute definition of part title, increases the attribute definition to preset basic control title newly on this basis, and by target widget name
The attribute value of title is assigned to basic control title, replaces the basis control title using source control title later, realizes to control
The rapid and convenient of part title is replaced, and the mistake that encapsulation function completes replacement processing can be called directly especially in JavaScript
Journey, it is simple and efficient, it is versatile.
In one embodiment, version information includes browser type and browser version number.
Wherein, browser type is used to identify the name of product of browser, and browser version number is specific product version
Number.For example, the browser type of version information IE11.1198.14393.0 is IE, browser version number is
11.1198.14393.0 the version information Chrome69.0.3497.100 of the Chrome browser of Google, browser
Type is Chrome, and browser version number is 69.0.3497.100, the version information for browser Firefox browser of increasing income
Firefox61.0.2, browser type Firefox, browser version number are 61.0.2.
Further, as shown in figure 4, in step sl, obtaining the version information of browser, specifically comprising the following steps:
S11: user agent's character string of browser is obtained.
Specifically, user agent (User Agent, UA) character string is a special string, passes through user agent's character
String can obtain operating system and version, cpu type, browser and version, browser rendering engine, browser language, browsing
The information such as device plug-in unit.
In JavaScript, the user agent of browser can be obtained using function navigator.userAgent ()
Character string.For example, by taking IE11 browser as an example, by calling navigator.userAgent (), the use of obtained browser
Act on behalf of character string in family are as follows: IE/11.1198.14393.0.
S12: according to the preset message structure of user agent's character string, browser model is extracted from user agent's character string
With browser version number.
Specifically, the user agent's character string obtained according to step S11, according to preset message structure to the user agent
Character string is parsed, and corresponding browser model and browser version number are extracted from user agent's character string.
For example, if user agent's character string are as follows: IE/11.1198.14393.0, then according to the information knot of preset " */* "
Structure, using the substring before user agent's character string "/" as browser model, by the substring after user agent's character string "/"
As browser version number.
It should be noted that due in browser version number, digital representation browser before first decimal point
Major release, in general, major release is the primary identity information that a certain function whether is supported for distinguishing browser, therefore,
It, can also be according to the number of application needed to extract before first decimal point, for example, to user when extracting browser version
Acting on behalf of character string: IE/11.1198.14393.0 can be 11 according to the browser version number that needs to extract of application.
In the present embodiment, by obtaining user agent's character string of browser, and according to preset message structure to user
It acts on behalf of character string to be parsed, it is quasi- to obtain browser model and browser version number, implementation simple general-purpose, and result
Really.
In one embodiment, in step s 2, it if the version information of browser meets preset edition compatibility requirement, obtains
The form controls in list to be committed is taken, is specifically comprised the following steps:
If browser type belongs to preset objective browser, and browser version number is less than preset version number's threshold
Value, then obtain the form controls in list to be committed.
Specifically, according to the obtained browser type of step S12 and browser version number, when browser type belong to it is default
Objective browser, and browser version number be less than preset version number's threshold value when, confirmation need to treat submission form progress
Compatible processing obtains the form controls in list to be committed.
In the present embodiment, since numbering of the different browsers product to browser version is different, and different clear
Looking at the compatibility issue attribute value of control title being set dynamically in device product may also be different, therefore, passes through browsing
Whether device type and browser version comprehensive descision, which need to treat submission form, carries out compatible processing, can be more reasonable
To judging result, incompatible browser version is accurately identified.
In one embodiment, as shown in figure 5, in step s 5, being parsed to updated list to be committed, and will solution
It analyses obtained form data and is sent to server-side, specifically comprise the following steps:
S51: according to preset verification condition, validation verification is carried out to the content of updated list to be committed.
Specifically, it before submission form data, needs logical to the content in updated list to be committed, especially user
The information of input frame input is crossed, validation verification is carried out, to ensure that content is effective.
The content of validation verification includes but is not limited to the verifying to the length of input character string, is tested string format
Card, the verifying to shielding keyword, and the verifying etc. to string content legitimacy.Wherein, to the verifying of string format
Including the format verification to the various input character strings such as mailbox, login name, password, the verifying to string content legitimacy includes
To whether password twice is consistent, whether mail address is legal, whether Chinese or English name are legal etc..
Preset verification condition is configured with specific reference to the needs of practical application, herein with no restrictions, for example, input
Password Length is not less than 6 characters etc..
S52: if validation verification passes through, connecing for server-side is obtained from the form tags of updated list to be committed
Address information is received, and according to the type of each form controls in updated list to be committed, to the content of each form controls
It is parsed, obtains the corresponding control content of each form controls.
Specifically, if the validation verification of step S51 passes through, confirm the content legality in updated list to be committed
Effectively, server-side can be submitted to be handled.Updated list to be committed include form tags, form fields and list by
Three parts of button, wherein form tags contain the server-side processing all general network management interface (Common of form data
Gateway Interface, CGI) program uniform resource locator (Uniform Resource Locator, URL), and
Form data is submitted to the way of submission of server.
URL, i.e. the reception address information of server-side are obtained from the form tags of updated list to be committed.For example,
Form tags are as follows: < action=" http://wichkelysmart.com/hfhtmlcss/contest.php " method="
Post " >, then the reception address information got is http://wichkelysmart.com/hfhtmlcss/
Contest.php needs to submit to form data in the hftmlcss file in wichkelysmart.com link
Contest.php script is handled.
According to the type of each form controls in updated list to be committed, the content of each form controls is solved
Analysis, obtains the control content of the corresponding key-value form of each form controls.
For example, to<input type=" text " name=" username " value=" zhangsan ">this text
The input form controls of type is defined according to the corresponding control property of text type, and the corresponding control property of text type includes
Name and value parses the content of the form controls, obtains the control content of key-value form, and key is
It is username=that username, value zhangsan, i.e. parsing, which obtain the corresponding control content of the form controls,
zhangsan。
S53: the corresponding control content of each form controls is formed into form data, and sends reception ground for form data
The corresponding position of location information.
Specifically, according to preset combination, by the control content array of the obtained each form controls of step S52
At character string, form data is generated, for example, querystring.stringify () realization can be used in JavaScript
Character string is serialized, form data is obtained.
The corresponding position of reception address information that step S52 is got is sent by form data, so that server-side is at this
The processing script for receiving address information is received and is handled to form data.
In the present embodiment, according to preset verification condition, validity is carried out to the content of updated list to be committed and is tested
Card, ensure that the content legality in updated list to be committed is effective by validation verification, can be submitted to server-side into
Row processing, so that the verification for needing to carry out in server-side originally, can be distributed to often by simple JavaScript code
A client carries out, and can be realized same effect, to reduce the operating load of server-side, that improves server-side executes effect
Rate;After validation verification passes through, the reception address letter of server-side is obtained from the form tags of updated list to be committed
Breath, and by the Context resolution of each form controls at the control content of key-value form, sequence chemical conversion is carried out to control content
Character string generates form data, sends form data to and receives the corresponding position of address information, by by control content array
The mode of chemical conversion character string is transmitted, and effectively improves efficiency of transmission, while the mode serialized can also mention to a certain extent
The transmission security of high declaration form data.
It should be understood that the size of the serial number of each step is not meant that the order of the execution order in above-described embodiment, each process
Execution sequence should be determined by its function and internal logic, the implementation process without coping with the embodiment of the present invention constitutes any limit
It is fixed.
In one embodiment, a kind of page table list processing unit is provided, the page table list processing unit and above-described embodiment
Middle page table list processing method corresponds.As shown in fig. 6, the page table list processing unit includes that version obtains module 61, control
Part obtains module 62, checks module 63, update module 64 and parsing module 65.Detailed description are as follows for each functional module:
Version obtains module 61, if obtaining for detecting that user triggers the operation that list is submitted by browser page
Take the version information of browser;
Control obtains module 62, if the version information for browser meets preset edition compatibility requirement, obtain to
Form controls in submission form;
Module 63 is checked, for existing according to control title in each browser version prestored in preset control data table
The variation relation of front and back is set dynamically, the control title of each form controls is checked, if the control title of form controls
Control name after dynamic setting is referred to as then using the form controls as control to be processed for the control title after dynamic setting
For target widget title, and control name of the target widget title before dynamic setting be referred to as source control title;
Update module 64, for will replace with the attribute definition of target widget title to source control name in control to be processed
The attribute definition of title obtains updated list to be committed;
Parsing module 65, for parsing to updated list to be committed, and the form data that parsing is obtained is sent out
It is sent to server-side.
Further, update module 64 includes:
Submodule 641 is deleted, in control to be processed, obtaining the attribute value of target widget title, and is deleted to mesh
Mark the attribute definition of control title;
Newly-increased submodule 642 will for increasing the attribute definition to preset basic control title newly in control to be processed
The attribute value of target widget title is assigned to basic control title;
Submodule 643 is replaced, for the basic control title in control to be processed to be replaced with source control title.
Further, version information includes browser type and browser version number, and version obtains module 61 and includes:
User agent's acquisition submodule 611, for obtaining user agent's character string of browser;
Extracting sub-module 612 is used for according to the preset message structure of user agent's character string, from user agent's character string
Extract browser type and browser version number.
Further, control obtains module 62 and is also used to:
If browser type belongs to preset objective browser, and browser version number is less than preset version number's threshold
Value, then obtain the form controls in list to be committed.
Further, parsing module 65 includes:
Submodule 651 is verified, for having to the content of updated list to be committed according to preset verification condition
The verifying of effect property;
Context resolution submodule 652, if passing through for validation verification, from the list mark of updated list to be committed
The reception address information of server-side is obtained in label, and according to the type of each form controls in updated list to be committed, it is right
The content of each form controls is parsed, and the corresponding control content of each form controls is obtained;
Sending submodule 653 is assembled, for the corresponding control content of each form controls to be formed form data, and by table
Forms data, which is sent to, receives the corresponding position of address information.
Specific about page table list processing unit limits the limit that may refer to above for page table list processing method
Fixed, details are not described herein.Modules in above-mentioned page table list processing unit can fully or partially through software, hardware and its
Combination is to realize.Above-mentioned each module can be embedded in the form of hardware or independently of in the processor in computer equipment, can also be with
It is stored in the memory in computer equipment in a software form, in order to which processor calls the above modules of execution corresponding
Operation.
In one embodiment, a kind of computer equipment is provided, which can be terminal, internal structure
Figure can be as shown in Figure 7.The computer equipment includes processor, the memory, network interface, display connected by system bus
Screen and input unit.Wherein, the processor of the computer equipment is for providing calculating and control ability.The computer equipment is deposited
Reservoir includes non-volatile memory medium, built-in storage.The non-volatile memory medium is stored with operating system and computer journey
Sequence.The built-in storage provides environment for the operation of operating system and computer program in non-volatile memory medium.The calculating
The network interface of machine equipment is used to communicate with external server by network connection.When the computer program is executed by processor with
Realize a kind of page table list processing method.
In one embodiment, a kind of computer equipment is provided, including memory, processor and storage are on a memory simultaneously
The computer program that can be run on a processor, processor realize that above-described embodiment page table list is handled when executing computer program
The step of method, such as step S1 shown in FIG. 1 to step S5, alternatively, processor realizes above-mentioned reality when executing computer program
Apply the function of each module/unit of page table list processing unit in example, such as module 61 shown in Fig. 6 is to the function of module 65.For
It avoids repeating, details are not described herein again.
In one embodiment, a kind of computer readable storage medium is provided, computer program, computer are stored thereon with
Page table list processing method in above method embodiment is realized when program is executed by processor, alternatively, the computer program is located
Manage the function that each module/unit in page table list processing unit in above-mentioned apparatus embodiment is realized when device executes.To avoid repeating,
Details are not described herein again.
Those of ordinary skill in the art will appreciate that realizing all or part of the process in above-described embodiment method, being can be with
Relevant hardware is instructed to complete by computer program, the computer program can be stored in a non-volatile computer
In read/write memory medium, the computer program is when being executed, it may include such as the process of the embodiment of above-mentioned each method.Wherein,
To any reference of memory, storage, database or other media used in each embodiment provided herein,
Including non-volatile and/or volatile memory.Nonvolatile memory may include read-only memory (ROM), programming ROM
(PROM), electrically programmable ROM (EPROM), electrically erasable ROM (EEPROM) or flash memory.Volatile memory may include
Random access memory (RAM) or external cache.By way of illustration and not limitation, RAM is available in many forms,
Such as static state RAM (SRAM), dynamic ram (DRAM), synchronous dram (SDRAM), double data rate sdram (DDRSDRAM), enhancing
Type SDRAM (ESDRAM), synchronization link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM
(RDRAM), direct memory bus dynamic ram (DRDRAM) and memory bus dynamic ram (RDRAM) etc..
It is apparent to those skilled in the art that for convenience of description and succinctly, only with above-mentioned each function
Can unit, module division progress for example, in practical application, can according to need and by above-mentioned function distribution by different
Functional unit, module are completed, i.e., the internal structure of described device is divided into different functional unit or module, more than completing
The all or part of function of description.
Embodiment described above is merely illustrative of the technical solution of the present invention, rather than its limitations;Although referring to aforementioned reality
Applying example, invention is explained in detail, those skilled in the art should understand that: it still can be to aforementioned each
Technical solution documented by embodiment is modified or equivalent replacement of some of the technical features;And these are modified
Or replacement, the spirit and scope for technical solution of various embodiments of the present invention that it does not separate the essence of the corresponding technical solution should all
It is included within protection scope of the present invention.
Claims (10)
1. a kind of page table list processing method, which is characterized in that the page table list processing method includes:
If detecting, user triggers the operation that list is submitted by browser page, obtains the version information of the browser;
If the version information meets preset edition compatibility requirement, the form controls in list to be committed is obtained;
According to variation of the control title before and after dynamic setting in each browser version prestored in preset control data table
Relationship checks the control title of each form controls, if the entitled dynamic setting of the control of the form controls
Control name after the dynamic setting is referred to as target then using the form controls as control to be processed by control title afterwards
Control title, and control name of the target widget title before dynamic setting is referred to as source control title;
The category to the source control title will be replaced with to the attribute definition of the target widget title in the control to be processed
Property definition, obtain the updated list to be committed;
The updated list to be committed is parsed, and sends server-side for the form data that parsing obtains.
2. page table list processing method as described in claim 1, which is characterized in that it is described by the control to be processed to institute
The attribute definition for stating target widget title replaces with attribute definition to the source control title, obtains updated described wait mention
Hand over list include:
In the control to be processed, the attribute value of the target widget title is obtained, and delete to the target widget title
Attribute definition;
The attribute definition to preset basic control title is increased newly in the control to be processed, by the target widget title
Attribute value is assigned to the basic control title;
The basic control title in the control to be processed is replaced with into the source control title.
3. page table list processing method as described in claim 1, which is characterized in that the version information includes browser type
With browser version number, the version information for obtaining the browser includes:
Obtain user agent's character string of the browser;
According to the preset message structure of user agent's character string, the browser is extracted from user agent's character string
Type and the browser version number.
4. page table list processing method as claimed in claim 3, which is characterized in that preset if the version information meets
Edition compatibility requirement, then the form controls obtained in list to be committed includes:
If the browser type belongs to preset objective browser, and the browser version number is less than preset version number
Threshold value then obtains the form controls in list to be committed.
5. such as the described in any item page table list processing methods of Claims 1-4, which is characterized in that described to updated institute
It states list to be committed to be parsed, and sends server-side for the form data that parsing obtains and include:
According to preset verification condition, validation verification is carried out to the content of the updated list to be committed;
If the validation verification passes through, the server-side is obtained from the form tags of the updated list to be committed
Reception address information, and according to the type of each form controls in the updated list to be committed, to each institute
The content for stating form controls is parsed, and the corresponding control content of each form controls is obtained;
By each form controls corresponding control content composition form data, and institute is sent by the form data
It states and receives the corresponding position of address information.
6. a kind of page table list processing unit, which is characterized in that the page table list processing unit includes:
Version obtains module, if the operation submitted for detecting user by browser page triggering list, described in acquisition
The version information of browser;
Control obtains module and obtains in list to be committed if meeting preset edition compatibility requirement for the version information
Form controls;
Module is checked, for dynamically setting according to control title in each browser version prestored in preset control data table
The variation relation for setting front and back, checks the control title of each form controls, if the control name of the form controls
Control title after being referred to as set dynamically, then using the form controls as control to be processed, by the control after the dynamic setting
Name is referred to as target widget title, and control name of the target widget title before dynamic setting is referred to as source control name
Claim;
Update module, for will replace with the attribute definition of the target widget title to the source in the control to be processed
The attribute definition of control title obtains the updated list to be committed;
Parsing module, for parsing to the updated list to be committed, and the form data that parsing is obtained is sent
To server-side.
7. page table list processing unit as claimed in claim 6, which is characterized in that the update module includes:
Submodule is deleted, in the control to be processed, obtaining the attribute value of the target widget title, and is deleted to institute
State the attribute definition of target widget title;
Newly-increased submodule, for increasing the attribute definition to preset basic control title newly in the control to be processed, by institute
The attribute value for stating target widget title is assigned to the basic control title;
Submodule is replaced, for the basic control title in the control to be processed to be replaced with the source control title.
8. page table list processing unit as claimed in claim 6, which is characterized in that the version information includes browser type
With browser version number, the version obtains module and includes:
User agent's acquisition submodule, for obtaining user agent's character string of the browser;
Extracting sub-module is used for according to the preset message structure of user agent's character string, from user agent's character string
The middle extraction browser type and the browser version number.
9. a kind of computer equipment, including memory, processor and storage are in the memory and can be in the processor
The computer program of upper operation, which is characterized in that the processor realized when executing the computer program as claim 1 to
The step of 5 described in any item page table list processing methods.
10. a kind of computer readable storage medium, the computer-readable recording medium storage has computer program, and feature exists
In realization such as page table list processing method described in any one of claim 1 to 5 when the computer program is executed by processor
The step of.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811339106.9A CN109657178B (en) | 2018-11-12 | 2018-11-12 | Page form processing method and device, computer equipment and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811339106.9A CN109657178B (en) | 2018-11-12 | 2018-11-12 | Page form processing method and device, computer equipment and storage medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN109657178A true CN109657178A (en) | 2019-04-19 |
CN109657178B CN109657178B (en) | 2024-03-01 |
Family
ID=66110838
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201811339106.9A Active CN109657178B (en) | 2018-11-12 | 2018-11-12 | Page form processing method and device, computer equipment and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN109657178B (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112766910A (en) * | 2021-01-21 | 2021-05-07 | 深圳市极致科技股份有限公司 | Document construction method, document generation device, electronic equipment and storage medium |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103997492A (en) * | 2014-05-20 | 2014-08-20 | 五八同城信息技术有限公司 | Adaption system and method |
WO2015022701A2 (en) * | 2013-08-12 | 2015-02-19 | Ciphergraph Networks Private Limited | Method and system of routing and handover of secure communication without knowledge of private/secret key |
WO2016131311A1 (en) * | 2015-07-16 | 2016-08-25 | 中兴通讯股份有限公司 | Browser compatibility method and browser |
CN106888247A (en) * | 2016-12-26 | 2017-06-23 | 沈阳通用软件有限公司 | A kind of unified terminal IE configurations and the method for protection |
-
2018
- 2018-11-12 CN CN201811339106.9A patent/CN109657178B/en active Active
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2015022701A2 (en) * | 2013-08-12 | 2015-02-19 | Ciphergraph Networks Private Limited | Method and system of routing and handover of secure communication without knowledge of private/secret key |
CN103997492A (en) * | 2014-05-20 | 2014-08-20 | 五八同城信息技术有限公司 | Adaption system and method |
WO2016131311A1 (en) * | 2015-07-16 | 2016-08-25 | 中兴通讯股份有限公司 | Browser compatibility method and browser |
CN106354484A (en) * | 2015-07-16 | 2017-01-25 | 中兴通讯股份有限公司 | Browser compatibility method and browser |
CN106888247A (en) * | 2016-12-26 | 2017-06-23 | 沈阳通用软件有限公司 | A kind of unified terminal IE configurations and the method for protection |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112766910A (en) * | 2021-01-21 | 2021-05-07 | 深圳市极致科技股份有限公司 | Document construction method, document generation device, electronic equipment and storage medium |
Also Published As
Publication number | Publication date |
---|---|
CN109657178B (en) | 2024-03-01 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN108304498B (en) | Webpage data acquisition method and device, computer equipment and storage medium | |
US8725794B2 (en) | Enhanced website tracking system and method | |
US8448241B1 (en) | Browser extension for checking website susceptibility to cross site scripting | |
CN110688598B (en) | Service parameter acquisition method and device, computer equipment and storage medium | |
US20100064234A1 (en) | System and Method for Browser within a Web Site and Proxy Server | |
CN108897788B (en) | Data crawling method and device, computer equipment and storage medium | |
US8131753B2 (en) | Apparatus and method for accessing and indexing dynamic web pages | |
CN112637361B (en) | Page proxy method, device, electronic equipment and storage medium | |
CN107995153B (en) | Form data verification method and form data verification device | |
CN103577526B (en) | It is a kind of to verify method, system and browser that whether the page is changed | |
US9971636B2 (en) | Methods for implementing web services and devices thereof | |
CN102929985A (en) | Method and system for displaying collected webpage | |
US10019420B2 (en) | System and method for adding functionality to web-based applications having no extensibility features | |
CN103577427A (en) | Browser kernel based web page crawling method and device and browser containing device | |
CN109672658B (en) | JSON hijacking vulnerability detection method, device, equipment and storage medium | |
WO2020207022A1 (en) | Scrapy-based data crawling method and system, terminal device, and storage medium | |
US20160342689A1 (en) | Method, device and system for loading recommendation information and detecting web address | |
CN110119489A (en) | The automatic register method of information, device, computer equipment and storage medium | |
US8090702B2 (en) | Analyzing web site traffic | |
CN111431767B (en) | Multi-browser resource synchronization method and device, computer equipment and storage medium | |
CN103377194A (en) | Method, device and browser for accelerating access to web pages | |
US9571555B2 (en) | Methods circuits devices systems and associated computer executable code for web augmentation | |
US20210243174A1 (en) | Auto-Form Fill Based Website Authentication | |
CN109657178A (en) | Page table list processing method, device, computer equipment and storage medium | |
CN110460685B (en) | User unique identifier processing method and device, computer equipment and storage medium |
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 | ||
GR01 | Patent grant | ||
GR01 | Patent grant |