CN106844635A - The edit methods and device of the element in webpage - Google Patents

The edit methods and device of the element in webpage Download PDF

Info

Publication number
CN106844635A
CN106844635A CN201710044283.3A CN201710044283A CN106844635A CN 106844635 A CN106844635 A CN 106844635A CN 201710044283 A CN201710044283 A CN 201710044283A CN 106844635 A CN106844635 A CN 106844635A
Authority
CN
China
Prior art keywords
code
webpage
analyzed
edited
fresh information
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
Application number
CN201710044283.3A
Other languages
Chinese (zh)
Other versions
CN106844635B (en
Inventor
梁宇轩
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN201710044283.3A priority Critical patent/CN106844635B/en
Publication of CN106844635A publication Critical patent/CN106844635A/en
Application granted granted Critical
Publication of CN106844635B publication Critical patent/CN106844635B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/958Organisation or management of web site content, e.g. publishing, maintaining pages or automatic linking

Abstract

The embodiment of the invention provides the edit methods and device of the element in a kind of webpage, can directly in the editor of the enterprising row element of webpage using the method, the tactile opsition dependent in webpage is determined first, obtained from the corresponding web page code file of webpage according to tactile opsition dependent again and touch the corresponding object code of opsition dependent, object code correspondence element to be edited, the display elements editing interface in webpage, fresh information can be input into by element editing interface, the fresh information is used to for the element to be edited in webpage to replace with more new element.Element in webpage is entered during the entire process of edlin, all operated on webpage, without artificially being modified to the code in web page code file, so amateur programming personnel can also enter edlin by the method that the embodiment of the present application is provided to the element in webpage, the scope of application is wider.

Description

The edit methods and device of the element in webpage
Technical field
The invention relates to web page editing technical field, more particularly relate to element in webpage edit methods and Device.
Background technology
Website (Website) refers on the internet, according to certain rule, to use HTML (Hyper Text Markup Language, HyperText Markup Language) etc. tool making the set for showing certain content related web page.Webpage is one The individual text-only file comprising html tag, can be presented following element on webpage:Word, picture, animation, music, link etc. Deng.
Website relates generally to the editor of each element on webpage in the test operation stage, the modification of such as element, and each element The main process that editor is related to is as follows:The corresponding web page code file of webpage is obtained, by corresponding code in web page code file After modifying, then by the web page code files passe after renewal to server, server can be by according to the webpage generation after updating Code file is updated to the corresponding web page code file that its own is stored, so as to complete the editor of each element on webpage.Logical Crossing to browse during webpage obtains webpage needs into after the element of edlin, due to being related to the modification of web page code file, it is therefore desirable to Professional programmer is modified to the code in web page code file.
To sum up, the edit methods at present to the element in webpage are only applicable to professional programmer, and the scope of application is smaller.
The content of the invention
In view of this, the invention provides the edit methods and device of the element in a kind of webpage, to overcome prior art In when the element in webpage is needed into edlin, it is necessary to professional programmer is compiled to the code in web page code file Volume, cause the problem of efficiency reduction.
To achieve the above object, the present invention provides following technical scheme:
A kind of edit methods of the element in webpage, including:
Tactile opsition dependent in detection webpage;
According to the tactile opsition dependent, object code, the target are obtained from the corresponding web page code file of the webpage Associated codes have the element to be edited pointed by the tactile opsition dependent;
Display elements editing interface;
By the element editing interface, fresh information is received, the fresh information is used to replace the element to be edited It is changed to more new element;
The object code is updated according to the fresh information.
The editing device of element in a kind of webpage, including:
Position module is determined, for determining the tactile opsition dependent in webpage;
Code module is obtained, for according to the tactile opsition dependent, being obtained from the corresponding web page code file of the webpage The corresponding object code of tactile opsition dependent, object code correspondence element to be edited;
Display module, for the display elements editing interface in the webpage;
Fresh information module is received, for by the element editing interface, receiving fresh information, the fresh information is used In the element to be edited is replaced with into more new element;
Update module, for being updated to the object code in the web page code file according to the fresh information.
Understood via above-mentioned technical scheme, compared with prior art, in the embodiment of the invention provides a kind of webpage The edit methods of element, can directly in the editor of the enterprising row element of webpage using the method, it is first determined tactile in webpage is pressed Position, then the corresponding object code of tactile opsition dependent, the mesh are obtained from the corresponding web page code file of webpage according to opsition dependent is touched Mark code correspondence element to be edited, the display elements editing interface in webpage can be input into by element editing interface and update letter Breath, the fresh information is used to for the element to be edited in webpage to replace with more new element.Edlin is entered to the element in webpage In whole process, all operated on webpage, without artificially being modified to the code in web page code file, so Amateur programming personnel can also enter edlin, the scope of application by the method that the embodiment of the present application is provided to the element in webpage It is wider.
Brief description of the drawings
In order to illustrate more clearly about the embodiment of the present invention or technical scheme of the prior art, below will be to embodiment or existing The accompanying drawing to be used needed for having technology description is briefly described, it should be apparent that, drawings in the following description are only this Inventive embodiment, for those of ordinary skill in the art, on the premise of not paying creative work, can also basis The accompanying drawing of offer obtains other accompanying drawings.
The structured flowchart of the editing system of the element in the webpage that Fig. 1 is provided for the embodiment of the present application;
Fig. 2 is the partial schematic diagram of the homepage by the rifle fire chivalrous person website of the browser access in terminal;
The schematic flow sheet of the edit methods of the element in a kind of webpage that Fig. 3 is provided for the embodiment of the present application;
The schematic diagram of the band of position in the webpage that Fig. 4 is provided for the embodiment of the present application;
One of display elements editing interface in the edit methods of the element in the webpage that Fig. 5 is provided for the embodiment of the present application Plant the schematic flow sheet of implementation;
A kind of schematic diagram of element editing interface that Fig. 6 is provided for the embodiment of the present application;
The structural representation of the editing device of element in a kind of webpage that Fig. 7 is provided for the embodiment of the present application;
Fig. 8 is the hardware configuration frame of the terminal of the editing device of the element comprising in webpage provided in an embodiment of the present invention Figure.
Specific embodiment
Below in conjunction with the accompanying drawing in the embodiment of the present invention, the technical scheme in the embodiment of the present invention is carried out clear, complete Site preparation is described, it is clear that described embodiment is only a part of embodiment of the invention, rather than whole embodiments.It is based on Embodiment in the present invention, it is every other that those of ordinary skill in the art are obtained under the premise of creative work is not made Embodiment, belongs to the scope of protection of the invention.
The edit methods of the element in the webpage that the embodiment of the present application is recorded can apply to the editor of the element in webpage System, as shown in figure 1, the structured flowchart of the editing system of element in the webpage provided for the embodiment of the present application.
The editing system of the element in webpage includes terminal 11 and server 12.Browser is mounted with terminal 11, is used Family can be by the browser access webpage in terminal.For example user can be by browser access " rifle fire chivalrous person " website, such as It is the partial schematic diagram of the homepage by the rifle fire chivalrous person website of the browser access in terminal 11 shown in Fig. 2.Wherein, rifle fire Chivalrous person 21 is picture element, and video game character 22, press center 23 and video pictures 24 are text element.User can be in terminal Edlin is entered to each element in the webpage (homepage of rifle fire chivalrous person website as shown in Figure 2) shown in 11, to element in webpage Editor after, the corresponding web page code file of the webpage that terminal is parsed can be changed accordingly therewith.
Terminal 11 sends to server 12 the web page code file after renewal, and server 12 can be according to the webpage after updating Corresponding web page code file (the web page code text of the homepage of rifle fire chivalrous person website as shown in Figure 2 that code file is stored to body Part) it is updated, it is clear when other users access the homepage of rifle fire chivalrous person website by the browser in respective terminal again Device of looking at can be presented the homepage of rifle fire chivalrous person website according to the web page code file after updating.
With reference to the editing system of the element in above-mentioned webpage, the edit methods to the element in the webpage in terminal enter Row explanation, as shown in figure 3, the schematic flow sheet of the edit methods of element in a kind of webpage provided for the embodiment of the present application, The method includes:
Step S301:Tactile opsition dependent in detection webpage.
User is needed to that when a certain element is modified in the webpage of display in terminal, can touch by corresponding element, this When terminal can detect in webpage by touch by tactile opsition dependent.When terminal is touch screen terminal, user can be by the aobvious of terminal Display screen is touched and presses a certain element in webpage, and when terminal is non-touch screen terminal, user can be touched by mouse and press certain unitary in webpage Element.
Step S302:According to the tactile opsition dependent, object code is obtained from the corresponding web page code file of the webpage, The object code is associated with the element to be edited pointed by the tactile opsition dependent.
Each webpage has a web page code file, and web page code file includes each element corresponding generation shown in webpage Code, i.e., each element shown in webpage is all presented by corresponding code in web page code file, is pressed when user touches In webpage behind a certain position, terminal can obtain the corresponding object code of tactile opsition dependent.
Step S303:Display elements editing interface.
Depending on the positional information that element editing interface shows in webpage can be according to actual conditions, for example, it is displayed in and waits to compile The surface (covering element to be edited) of element is collected, or be displayed in the side of element to be edited etc., by taking Fig. 2 as an example, user touches After by video game character 22, can display elements editing interface 25 in webpage.Element editing interface 25 is displayed in video game character 22 Side.
Element editing interface 25 is only to facilitate skilled artisan understands that and a kind of optional element of offer is compiled Editing interface, the form of expression of the element editing interface in the embodiment of the present application includes but is not limited to element editing interface 25.
Step S302 and step S303 can be performed simultaneously, it is also possible to first carried out step S303 and performed step S302 again, Step S302 can be first carried out and perform step S303 again.
Step S304:By the element editing interface, fresh information is received, the fresh information is used to wait to compile by described Collect element and replace with more new element.
Still by taking Fig. 2 as an example, it is assumed that need that " video game character " is revised as " game feature ", then user can be in element editor Fresh information is input into interface 25 --- " game feature ", the content that will be shown in webpage in the embodiment of the present application is referred to as element, The content shown in element editing interface is referred to as fresh information.When the video game character 22 in webpage be revised as game feature it Afterwards, the game feature for being shown in webpage can be described as more new element.
Step S305:The object code is updated according to the fresh information.
Assuming that in Fig. 2 in web page code file with the corresponding object code of video game character 22 be title=" video game character ", The code then updated according to fresh information after the object code is title=" game feature ".
A kind of edit methods of the element in webpage are the embodiment of the invention provides, can directly in the enterprising row element of webpage Editor, to needing the element into edlin to be touched by rear, the embodiment of the present application can be according to the tactile opsition dependent in webpage for user Obtained from the corresponding web page code file of webpage and touch the corresponding object code of opsition dependent, display elements editor circle in webpage Face, user can be input into fresh information by element editing interface, and the fresh information is used to replace the element to be edited in webpage It is changed to more new element.Element in webpage is entered during the entire process of edlin, is all operated on webpage, without people It is that the code in web page code file is modified, so the method that amateur programming personnel is provided by the embodiment of the present application Edlin can also be entered to the element in webpage, the scope of application is wider.
It is " corresponding from the webpage according to the tactile opsition dependent in the edit methods embodiment of the element in above-mentioned webpage Object code is obtained in web page code file " there are various implementations, it is specifically described below.
The first, the implementation method that object code is obtained from the corresponding web page code file of webpage is as follows:
From predefined at least one band of position of the webpage, the corresponding target location area of the tactile opsition dependent is determined Domain, wherein, the corresponding element in the band of position is presented by corresponding code.From the corresponding code in the target location region, Filter out object code.
Each element all corresponds to a band of position in webpage, as shown in figure 4, position in the webpage provided for the embodiment of the present application The schematic diagram in region.
Assuming that showing element B in webpage, the origin pre-set in webpage is preset A, the position area where element B Domain 41 includes:Vertical range, the length of the band of position with the horizontal range of preset A in the webpage and the preset A And the height of the band of position.
User is touched when having pressed a certain element in webpage, and terminal can detect tactile opsition dependent, then judge which band of position Including the tactile opsition dependent, target location region is finally determined.
By taking the rifle fire chivalrous person 21 in Fig. 2 as an example, it is assumed that user touches and presses rifle fire chivalrous person 21, the target position belonging to the tactile opsition dependent Put the corresponding code in region as follows:
<H1class=" spr logo " onclick=" pgvSengClick ({ hottag:’main.nav.logo’})” ></h1>
The code includes starting label<H1 and and end-tag</h1>, in the embodiment of the present application can according to start mark Sign and end-tag judges the original position and end position of the corresponding code in each position region, may thereby determine that out mesh The corresponding code in cursor position region.In webpage, starting label has many kinds, and end-tag also has many kinds.Generally, Start label form for "<Character ", the form of end-tag for "</ character>", can be according to beginning label and end-tag Features described above come judge the character in web page files code whether be start label and end-tag.Specifically, can foundation Regular expression judges which is to start label in web page code file, and which is end-tag.
Class=in above-mentioned code " spr logo " are the object code for needing to filter out.
It is described in detail below how from the corresponding code in target location region, filters out the realization side of the object code Method.
From the corresponding code in the object code region, code to be analyzed is obtained;Judge be in the code to be analyzed It is no comprising element tags attribute, element tags attribute is used to indicate the element type of respective element;When in the code to be analyzed During comprising the element tags attribute, determine that the code to be analyzed is the object code.
Element tags attribute can include class, src, title etc., and the element type of class and src marks is figure Sheet type, the element type of title marks is text type.
Still by taking rifle fire chivalrous person 21 as an example, code to be analyzed can be onclick=" pgvSengClick ({ hottag:’ Main.nav.logo ' }) ", or class=" spr logo ".
If the code to be analyzed for starting to obtain is class=" spr logo ", the code to be analyzed includes element mark Attribute class is signed, then the object code is class=" spr logo ".
If the code to be analyzed for starting to obtain does not include element tags attribute, from the corresponding code in target location region In, filtering out the object code also includes:
When the element tags attribute is not included in the code to be analyzed, the prior-generation of the code to be analyzed is judged Whether code is to start label;When the previous code of the code to be analyzed is not when starting label, by the code to be analyzed Used as code to be analyzed, whether return judges the step of including element tags attribute in the code to be analyzed to previous code.
If the code to be analyzed for starting to obtain is onclick=" pgvSengClick ({ hottag:’ Main.nav.logo ' }) ", its previous code is class=" spr logo ", the code includes element tags attribute class, Then using class=" spr logo " as code to be analyzed.
When the element tags attribute is not included in the code to be analyzed, from the target location region corresponding generation In code, filtering out the object code also includes:
When the element tags attribute is not included in the code to be analyzed, the next generation of the code to be analyzed is judged Whether code is end-tag;
When the latter code of the code to be analyzed is not end-tag, using the latter code as generation to be analyzed Whether code, return judges the step of including element tags attribute in the code to be analyzed.
If the code to be analyzed for starting to obtain is onclick=" pgvSengClick ({ hottag:’ Main.nav.logo ' }) ", its next generation code is</h1>, it is end-tag, therefore will not backward search object code again.
Second, the implementation method that object code is obtained from the corresponding web page code file of webpage is as follows:
From predefined at least one band of position of the webpage, the corresponding target location area of the tactile opsition dependent is determined Domain, wherein, the corresponding element in the band of position is presented by corresponding code;Determine the corresponding unit to be edited of the tactile opsition dependent Element;From the corresponding code in target location region, it is determined that object code corresponding with the element to be edited.
It is understood that may be comprising the corresponding content letter of element to be edited in the code that includes of web page code file Breath, the location of same content (such as " video game character ") is different in the embodiment of the present application, and address is different, such as in webpage Referred to as element, is referred to as fresh information (such as feature of being played in Fig. 2 is fresh information), in web page code in element editing interface It is referred to as element corresponding contents information in file.
After the corresponding code in target location region is determined, bag can be searched for from the corresponding code in target location region The code of the corresponding content information of element to be edited is included, the code for including the corresponding content information of element to be edited is defined as mesh Mark code.
Assuming that the code in Fig. 2 in web page code file with the corresponding band of position of video game character 22 is as follows:
<Div href="/" title=" video game character " id=" popvideo "></div>, then according to " video game character " This content information, can directly determine that object code is title=" video game character " from above-mentioned code.
It is understood that the content information of picture element is picture, what web page code file was included is picture element The object code class=of store path or the function comprising store path, such as rifle fire chivalrous person 21 " spr logo ", spr Logo is a function, and spr logo functions include the store path of the rifle fire picture of chivalrous person 21, now, if using second side Rule cannot find the object code of picture element, and the object code of picture element can be now found using first way.
The implementation method of the corresponding element to be edited of tactile opsition dependent described to above-mentioned determination is illustrated below.
From predefined at least one band of position of the webpage, it is determined that the target location area comprising the tactile opsition dependent Domain, one of corresponding element in the band of position is presented by corresponding code;By the corresponding element in the target location region, It is defined as the element to be edited.
The element shown in the band of position, the band of position, the code that the element is presented are one-to-one, when it is determined that position Behind region, it is possible to obtain the element for showing and the code that the element is presented in the band of position.
Such as the display elements editing interface in the edit methods of the element in the webpage that Fig. 5 is provided for the embodiment of the present application A kind of schematic flow sheet of implementation, the method includes:
Step S501:The object element type of the element to be edited is determined according to the object code.
Because object code includes element tags attribute, element tags attribute can be with marker element type, such as element Tag attributes can include class, src, title etc., and the element type of class and src marks is picture/mb-type, title The element type of mark is text type.
Step S502:From the corresponding element editing interface of each element type for pre-setting, the object element is determined The corresponding element editing interface of type.
The different corresponding element editing interfaces of element type may be different, such as when element type is text type, unit Plain editing interface can be such as the element editing interface 25 in Fig. 2, as a Text Entry.
When element type is picture/mb-type or sound type, the element editor that element editing interface can be as shown in Figure 6 Interface 61.
User is touched after pressing rifle fire chivalrous person 22, and element editing interface 61 can be presented in webpage, is wrapped in element editing interface 61 The picture of rifle fire chivalrous person is included, button 62 is uploaded and is downloaded button 63.The background of the element editing interface 61 shown in Fig. 6 is can To be transparent, i.e., after display elements editing interface 61 in webpage, still it can be seen that in being covered by element editing interface 61 Hold, the background of certain element editing interface 61 may not be transparent, and this can be set according to actual needs.Do not make to have herein Body is limited.
Step S503:Show the corresponding element editing interface of the object element type.
Optionally, can show the corresponding content information of element to be edited (in the embodiment of the present application in element editing interface The element to be edited shown in element editing interface is referred to as the content information of element), can so save user input renewal The time of information, for example, user is touched after press video game character 22, " game spy is shown in the element editing interface 25 of display Color ", if user needs that " video game character " is revised as " game feature ", only needs to be revised as " color " " point ", saves Time of user input fresh information.
It is understood that the content information of the element to be edited having directly changes possible inconvenient in webpage, need The content information of the element to be edited is locally downloading, then enter edlin, the content information of such as picture element, sound unit The content information of element just is inconvenient to edit in webpage, therefore, optionally, in element editing interface can show there is download button And upload button.Now by the element editing interface, receiving fresh information includes:
When receiving the download button and being touched by instruction, the corresponding content information of element to be edited is downloaded;Obtain Take the fresh information entered after edlin to the content information of the element to be edited;Touched when the upload button is received During by instruction, the fresh information is uploaded.
It is understood that uploading fresh information (i.e. audio files), the fresh information of picture element of sound element When (i.e. picture) etc., the taking up room of the fresh information of possible sound element, the resolution ratio of the fresh information of picture element, meeting Beyond the predetermined threshold value of webpage, therefore, can also include in the edit methods embodiment of the element in any of the above-described webpage:Connecing Receive the upload button to be touched during by instruction, judge the property value of the fresh information whether less than or equal to predetermined threshold value;When When the property value for detecting the fresh information is less than or equal to the predetermined threshold value, the fresh information is received.
The attribute Value Types of the fresh information of different types of element are different, and the corresponding property value of such as sound element is to account for Use space;The corresponding property value of picture element is resolution ratio.The predetermined threshold value of different types of element is different.
During browser access webpage of the user in by terminal, edlin if desired is entered to webpage, then needed First determine to enter element edit pattern, when otherwise user touches and press a certain position in webpage, for example, touch when pressing video game character 22, meeting chain It is connected in the corresponding webpage of video game character 22.Therefore, in the edit methods embodiment of the element in any of the above-described webpage, in detection Also include before tactile opsition dependent in webpage:It is determined that into element edit pattern.
User can determine to enter element edit pattern by clicking on corresponding shortcut, such as by by t+d+e+b+e+ G+ carriage returns determine to enter element edit pattern.
Above-mentioned element edit pattern can be debug patterns.
It is understood that when user enters edlin to element in webpage, it may be necessary to the multiple elements of editor, now can be with After one element of editor every time, web page code file and the mark of web page code file after renewal are sent to server, The number of element is so edited, is exactly the number of times that terminal is interacted with server so that the editing speed of the element in webpage It is slower.
In order to improve the editing speed of the element in webpage, can by after all elements editor finishes in the webpage, then Web page code file and the mark of web page code file after the corresponding renewal of the webpage is sent to cloud server.
Terminal is detected when exiting the instruction of element edit pattern, and all elements editor finishes in being considered as the webpage.
The mark of the original web page code file of same webpage and the mark of web page code file after renewal are identical 's.
After the mark of server web page code file upon a reception of an updated and web page code file, can be deposited from advance In the corresponding web page code file of each mark of storage, it is determined that the corresponding target web code file of the mark for receiving;Foundation connects The web page code file for receiving is updated to target web code file.
The web page code file that above-mentioned foundation is received is updated to target web code file and can include:To receive To web page code file and target web code file compare, by target web code file with the webpage that receives Different code in code file, is updated to the corresponding code of web page code file for receiving.
Specifically, it is possible to use javascript in target web code file with the web page code file that receives in Different codes, such as word, the store path of picture etc. are updated.
If server receives the web page code file with same mark ID that multiple terminals send simultaneously, can first by Web page code file with same mark ID is merged, obtain one integrate after web page code file, then by server The corresponding web page code file for prestoring is compared with the web page code file after the integration, it is assumed that server is received simultaneously There are 3, respectively web page code file A, web page code file B and webpage to the web page code file with same mark ID Code file C, it is assumed that the code included in web page code file A is as follows:
<Meta name=" Description " content=" is penetrated by the first person that Tengxun's game is act as sole agent Hit game network game.">
<Meta name=" Keywords " content=" paladinsOL, paladins, rifle fire chivalrous person, rifle fire chivalrous person Online, rifle fire chivalrous person OL, modern war, shooting game, Call of Duty, Call of Duty Online, Call of Duty Online modern wars, black action, Price, ghost, soap, ghost, paladinsOL video, paladinsOL Official website, paladinsOL game is downloaded ">
Assuming that the code included in web page code file B is as follows:
<Meta name=" Description " content=" is penetrated by the first person that Tengxun's game is act as sole agent Hit game network game.">
<Meta name=" Keywords " content=" paladinsOL, paladins, rifle fire chivalrous person, rifle fire chivalrous person Online, rifle fire chivalrous person OL, modern war,Modern war OL, FPS, FPS network game, shooting game, Call of Duty, Call Of Duty Online, Callof Duty Online modern wars, black action, Price, ghost, soap, ghost, PaladinsOL videos, paladinsOL official websites, paladinsOL game is downloaded ">
Assuming that the code included in web page code file C is as follows:
<Meta name=" Description " content="《Rifle fire chivalrous person Online》It isPlayed exclusive generation by Tengxun The first person shooting game network game of reason.">
<Meta name=" Keywords " content=" paladinsOL, paladins, rifle fire chivalrous person, rifle fire chivalrous person Online, rifle fire chivalrous person OL, modern war, shooting game, Call of Duty, Call of Duty Online, Call of Duty Online modern wars, black action, Price, ghost, soap, ghost, paladinsOL video, paladinsOL Official website, paladinsOL game is downloaded ">
By comparing web page code file A, web page code file B and web page code file C, it is believed that difference and other two Content in individual web page files code is to update part (used overstriking underscore to protrude and updated part), so that it is determined that going out above-mentioned " modern war OL, FPS, FPS network game, shooting game " and "《Rifle fire chivalrous person Online》It is " be to update part, then after integrating Web page code file it is as follows:
<Meta name=" Description " content="《Rifle fire chivalrous person Online》It isPlayed exclusive generation by Tengxun The first person shooting game network game of reason.">
<Meta name=" Keywords " content=" paladinsOL, paladins, rifle fire chivalrous person, rifle fire chivalrous person Online, rifle fire chivalrous person OL, modern war,Modern war OL, FPS, FPS network game, shooting game, Call of Duty, Call Of Duty Online, Call of Duty Online modern wars, black action, Price, ghost, soap, ghost, PaladinsOL videos, paladinsOL official websites, paladinsOL game is downloaded ">
Tdebug.js can be added in web page code file in any of the above-described webpage in the edit methods embodiment of element Code in file.
The editing device to element in webpage provided in an embodiment of the present invention is introduced below, in webpage described below The editing device of element can be with the signaling process content in the edit methods of element in upper web page text mutually to should refer to.
Such as Fig. 7, the structural representation of the editing device of element, the device in a kind of webpage provided for the embodiment of the present application Including:Test position module 71, acquisition code module 72, display module 73, reception fresh information module 74 and update module 75, wherein:
Test position module 71, for detecting the tactile opsition dependent in webpage.
Code module 72 is obtained, for according to the tactile opsition dependent, being obtained from the corresponding web page code file of the webpage Object code is taken, the object code is associated with the element to be edited pointed by the tactile opsition dependent.
Display module 73, for display elements editing interface.
Fresh information module 74 is received, for by the element editing interface, receiving fresh information, the fresh information For the element to be edited to be replaced with into more new element.
Update module 75, for updating the object code according to the fresh information.
Optionally, the acquisition code module 72 in the editing device of the element in above-mentioned webpage can include:
First determining unit, for from predefined at least one band of position of the webpage, determining the tactile step-by-step Corresponding target location region is put, one of corresponding element in the band of position is presented by corresponding code;
Screening unit, for from the corresponding code in the target location region, filtering out object code.
Optionally, the screening unit in the editing device of the element in above-mentioned webpage includes:
First obtains subelement, for from the corresponding code in the object code region, obtaining code to be analyzed.
First judgment sub-unit, for whether judging in the code to be analyzed comprising element tags attribute, the element Tag attributes are used to indicate the element type of respective element.
First determination subelement, for when the element tags attribute is included in the code to be analyzed, it is determined that described Code to be analyzed is the object code.
Optionally, the screening unit in the editing device of the element in above-mentioned webpage also includes:
Second judgment sub-unit, for when the element tags attribute is not included in the code to be analyzed, judging institute Whether the previous code for stating code to be analyzed is to start label;
First returns to subelement, for when the previous code of the code to be analyzed is not beginning label, being treated described Used as code to be analyzed, whether return judges include element tags attribute in the code to be analyzed to the previous code of code analysis The step of.
Optionally, the screening unit in the editing device of the element in above-mentioned webpage also includes:
3rd judgment sub-unit, for when the element tags attribute is not included in the code to be analyzed, judging institute Whether the latter code for stating code to be analyzed is end-tag;
Second returns to subelement, for when the latter code of the code to be analyzed is not end-tag, after described Used as code to be analyzed, whether return judges the step of including element tags attribute in the code to be analyzed to one code.
Optionally, the screening unit in the editing device of the element in above-mentioned webpage includes:
Second obtains subelement, for obtaining the corresponding element to be edited of the tactile opsition dependent;
Second determination subelement, for from the corresponding code in target location region, it is determined that with the unit to be edited The corresponding object code of element.
Optionally, the second acquisition subelement in the editing device of the element in above-mentioned webpage includes:
Determination sub-module, for by the corresponding element in the target location region, being defined as the element to be edited.
Optionally, the display module in the editing device of the element in any of the above-described webpage includes:
Determine element type unit, the object element class for determining the element to be edited according to the object code Type;
Boundary element is determined, for from the corresponding element editing interface of each element type for pre-setting, it is determined that described The corresponding element editing interface of object element type;
Display unit, for showing the corresponding element editing interface of the object element type.
Optionally, in the editing device of the element in any of the above-described webpage element editing interface displaying have download button with And button is uploaded, receiving fresh information module includes:
Download unit, for when receiving the download button and being touched by instruction, downloading the element to be edited corresponding Content information;
First acquisition unit, for obtaining the renewal entered after edlin to the content information of the element to be edited letter Breath;
Uploading unit, for when receiving the upload button and being touched by instruction, uploading the fresh information.
Optionally, the uploading unit in the editing device of the element in any of the above-described webpage includes:
4th judgment sub-unit, is touched during by instruction for receiving the upload button, judges the fresh information Whether property value is less than or equal to predetermined threshold value;
Receiving subelement, for when the property value for detecting the fresh information is less than or equal to the predetermined threshold value, connecing Receive the fresh information.
Optionally, the editing device of the element in any of the above-described webpage also includes:
Trigger module, for when element edit pattern is entered, triggering the determination position module.
Optionally, the editing device of the element in above-mentioned webpage also includes:
Instruction module is received, the instruction of element edit pattern is exited for receiving;
Transmitting element, sends for the web page code file and the mark of the web page code file after by renewal To cloud server.
Fig. 8 shows the hardware configuration of the terminal of the editing device of the element comprising in webpage provided in an embodiment of the present invention Block diagram, reference picture 8, terminal can include:Processor 81, communication interface 82, memory 83 and communication bus 84;
Wherein processor 81, communication interface 82, memory 83 complete mutual communication by communication bus 84;
Optionally, communication interface 82 can be the interface of communication module, such as interface of gsm module;
Processor 81, for configuration processor;
Memory 83, for depositing program and data;
Program can include program code, and described program code includes computer-managed instruction;Data can include webpage Code file.
Processor 81 is probably a central processor CPU, or specific integrated circuit ASIC (Application Specific Integrated Circuit), or it is arranged to implement one or more integrated electricity of the embodiment of the present invention Road.
Memory 83 may include high-speed RAM memory, it is also possible to also including nonvolatile memory (non-volatile Memory), for example, at least one magnetic disk storage.
Wherein, program can be specifically for:
Tactile opsition dependent in detection webpage;
According to the tactile opsition dependent, object code, the target are obtained from the corresponding web page code file of the webpage Associated codes have the element to be edited pointed by the tactile opsition dependent;
Display elements editing interface;
By the element editing interface, fresh information is received, the fresh information is used to replace the element to be edited It is changed to more new element;
The object code is updated according to the fresh information.
Finally, in addition it is also necessary to explanation, herein, such as first and second or the like relational terms be used merely to by One entity or operation make a distinction with another entity or operation, and not necessarily require or imply these entities or operation Between there is any this actual relation or order.And, term " including ", "comprising" or its any other variant meaning Covering including for nonexcludability, so that process, method, article or equipment including a series of key elements not only include that A little key elements, but also other key elements including being not expressly set out, or also include for this process, method, article or The intrinsic key element of equipment.In the absence of more restrictions, the key element limited by sentence "including a ...", does not arrange Except also there is other identical element in the process including the key element, method, article or equipment.
Each embodiment is described by the way of progressive in this specification, and what each embodiment was stressed is and other The difference of embodiment, between each embodiment identical similar portion mutually referring to.
The foregoing description of the disclosed embodiments, enables professional and technical personnel in the field to realize or uses the application. Various modifications to these embodiments will be apparent for those skilled in the art, as defined herein General Principle can in other embodiments be realized in the case where spirit herein or scope is not departed from.Therefore, the application The embodiments shown herein is not intended to be limited to, and is to fit to and principles disclosed herein and features of novelty phase one The scope most wide for causing.

Claims (16)

1. edit methods of the element in a kind of webpage, it is characterised in that including:
Tactile opsition dependent in detection webpage;
According to the tactile opsition dependent, object code, the object code are obtained from the corresponding web page code file of the webpage It is associated with the element to be edited pointed by the tactile opsition dependent;
Display elements editing interface;
By the element editing interface, fresh information is received, the fresh information is used to replace with the element to be edited More new element;
The object code is updated according to the fresh information.
2. edit methods of element according to claim 1 in webpage, it is characterised in that described according to the tactile step-by-step Put, object code is obtained from the corresponding web page code file of the webpage to be included:
From predefined at least one band of position of the webpage, the corresponding target location region of the tactile opsition dependent is determined, Wherein, a corresponding element in the band of position is presented by corresponding code;
From the corresponding code in the target location region, object code is filtered out.
3. edit methods of element according to claim 2 in webpage, it is characterised in that described from the target location area In the corresponding code in domain, filtering out the object code includes:
From the corresponding code in the object code region, code to be analyzed is obtained;
Judge that whether the element tags attribute is used to indicate respective element comprising element tags attribute in the code to be analyzed Element type;
When the element tags attribute is included in the code to be analyzed, determine that the code to be analyzed is the target generation Code.
4. edit methods of element according to claim 3 in webpage, it is characterised in that described from the target location area In the corresponding code in domain, filtering out the object code also includes:
When the element tags attribute is not included in the code to be analyzed, judging the previous code of the code to be analyzed is No is beginning label;
When the previous code of the code to be analyzed is not when starting label, using the previous code of the code to be analyzed as treating Whether code analysis, return judges the step of including element tags attribute in the code to be analyzed.
5. edit methods of the element in the webpage according to claim 3 or 4, it is characterised in that described from target position Put in the corresponding code in region, filtering out the object code also includes:
When the element tags attribute is not included in the code to be analyzed, judging the latter code of the code to be analyzed is No is end-tag;
When the latter code of the code to be analyzed is not end-tag, using the latter code as code to be analyzed, return Return and whether the step of including element tags attribute in the code to be analyzed judged.
6. edit methods of element according to claim 2 in webpage, it is characterised in that described from the target location area In the corresponding code in domain, filtering out the object code includes:
Obtain the corresponding element to be edited of the tactile opsition dependent;
From the corresponding code in target location region, it is determined that object code corresponding with the element to be edited.
7. edit methods of element according to claim 6 in webpage, it is characterised in that the acquisition tactile opsition dependent Corresponding element to be edited includes:
By the corresponding element in the target location region, it is defined as the element to be edited.
8. edit methods of element according to claim 1 in webpage, it is characterised in that the display elements editing interface Including:
The object element type of the element to be edited is determined according to the object code;
From the corresponding element editing interface of each element type for pre-setting, the corresponding element of the object element type is determined Editing interface;
Show the corresponding element editing interface of the object element type.
9. edit methods of the element in the webpage according to claim 1 or 8, it is characterised in that the element editing interface Displaying has download button and uploads button, described by the element editing interface, and receiving fresh information includes:
When receiving the download button and being touched by instruction, the corresponding content information of element to be edited is downloaded;
Obtain the fresh information entered after edlin to the content information of the element to be edited;
When receiving the upload button and being touched by instruction, the fresh information is uploaded.
10. edit methods of element according to claim 9 in webpage, it is characterised in that described when receiving on described Pass button to be touched during by instruction, uploading the fresh information includes:
Receive the upload button to be touched during by instruction, judge the property value of the fresh information whether less than or equal to default threshold Value;
When the property value for detecting the fresh information is less than or equal to the predetermined threshold value, the fresh information is received.
The edit methods of 11. element according to claim 1 in webpage, it is characterised in that in the detection webpage Also include before touching opsition dependent:
It is determined that into element edit pattern.
The edit methods of the element in 12. webpages according to claim 11, it is characterised in that also include:
The instruction of element edit pattern is exited in reception;
The mark of the web page code file and the web page code file after by renewal is sent to cloud server.
The editing device of element in a kind of 13. webpages, it is characterised in that including:
Test position module, for detecting the tactile opsition dependent in webpage;
Code module is obtained, for according to the tactile opsition dependent, target being obtained from the corresponding web page code file of the webpage Code, the object code is associated with the element to be edited pointed by the tactile opsition dependent;
Display module, for display elements editing interface;
Fresh information module is received, for by the element editing interface, receiving fresh information, the fresh information is used for will The element to be edited replaces with more new element;
Update module, for updating the object code according to the fresh information.
The editing device of element in 14. webpages according to claim 13, it is characterised in that the display module includes:
Determine element type unit, the object element type for determining the element to be edited according to the object code;
Boundary element is determined, for from the corresponding element editing interface of each element type for pre-setting, determining the target The corresponding element editing interface of element type;
Display unit, for showing the corresponding element editing interface of the object element type.
The editing device of element in 15. webpages according to claim 13, it is characterised in that also include:
Trigger module, for when element edit pattern is entered, triggering the determination position module.
The editing device of element in 16. webpages according to claim 15, it is characterised in that also include:
Instruction module is received, the instruction of element edit pattern is exited for receiving;
Transmitting element, sends to cloud for the web page code file and the mark of the web page code file after by renewal End server.
CN201710044283.3A 2017-01-19 2017-01-19 Method and device for editing elements in webpage Active CN106844635B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710044283.3A CN106844635B (en) 2017-01-19 2017-01-19 Method and device for editing elements in webpage

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710044283.3A CN106844635B (en) 2017-01-19 2017-01-19 Method and device for editing elements in webpage

Publications (2)

Publication Number Publication Date
CN106844635A true CN106844635A (en) 2017-06-13
CN106844635B CN106844635B (en) 2020-04-07

Family

ID=59119667

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710044283.3A Active CN106844635B (en) 2017-01-19 2017-01-19 Method and device for editing elements in webpage

Country Status (1)

Country Link
CN (1) CN106844635B (en)

Cited By (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107766106A (en) * 2017-12-05 2018-03-06 北京百度网讯科技有限公司 The method and apparatus for generating configuration file
CN107885860A (en) * 2017-11-21 2018-04-06 福州聆花信息科技有限公司 A kind of method, storage medium and electronic equipment for marking and showing on media file
CN109388787A (en) * 2017-08-10 2019-02-26 易易资设有限公司 Method for editing hyper document markup language document
WO2019105099A1 (en) * 2017-11-29 2019-06-06 广东神马搜索科技有限公司 Advertising style metadata configuration method and device, computing device and storage medium
CN109992349A (en) * 2019-04-11 2019-07-09 睿驰达新能源汽车科技(北京)有限公司 A kind of edit methods and device of prompt information of valuating
CN110020361A (en) * 2017-11-09 2019-07-16 北京搜狗科技发展有限公司 A kind of web page processing method, device, storage medium and electronic equipment
CN110222281A (en) * 2019-06-03 2019-09-10 贝壳技术有限公司 Object content localization method and system in webpage
CN111045645A (en) * 2019-11-08 2020-04-21 贝壳技术有限公司 Page editing method and device, electronic equipment and storage medium
CN111488405A (en) * 2020-04-16 2020-08-04 北京字节跳动网络技术有限公司 Information updating method and device
CN113657079A (en) * 2021-07-26 2021-11-16 浙江中控技术股份有限公司 Industrial process editing system for tank field management

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103853735A (en) * 2012-11-29 2014-06-11 怡丰联合(北京)科技有限责任公司 Hypertext markup language (HTML) template visualization manufacturing and compiling method and system
CN103942036A (en) * 2013-01-17 2014-07-23 腾讯科技(深圳)有限公司 Webpage content editing method and device
US20140258843A1 (en) * 2013-03-11 2014-09-11 Minds and Machines, LLC Method and system for inter-widget communication
CN106201489A (en) * 2016-06-30 2016-12-07 乐视控股(北京)有限公司 A kind of page editing method and apparatus

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103853735A (en) * 2012-11-29 2014-06-11 怡丰联合(北京)科技有限责任公司 Hypertext markup language (HTML) template visualization manufacturing and compiling method and system
CN103942036A (en) * 2013-01-17 2014-07-23 腾讯科技(深圳)有限公司 Webpage content editing method and device
US20140258843A1 (en) * 2013-03-11 2014-09-11 Minds and Machines, LLC Method and system for inter-widget communication
CN106201489A (en) * 2016-06-30 2016-12-07 乐视控股(北京)有限公司 A kind of page editing method and apparatus

Cited By (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109388787A (en) * 2017-08-10 2019-02-26 易易资设有限公司 Method for editing hyper document markup language document
CN110020361A (en) * 2017-11-09 2019-07-16 北京搜狗科技发展有限公司 A kind of web page processing method, device, storage medium and electronic equipment
CN107885860A (en) * 2017-11-21 2018-04-06 福州聆花信息科技有限公司 A kind of method, storage medium and electronic equipment for marking and showing on media file
WO2019105099A1 (en) * 2017-11-29 2019-06-06 广东神马搜索科技有限公司 Advertising style metadata configuration method and device, computing device and storage medium
CN107766106B (en) * 2017-12-05 2019-07-09 北京百度网讯科技有限公司 The method and apparatus for generating configuration file
CN107766106A (en) * 2017-12-05 2018-03-06 北京百度网讯科技有限公司 The method and apparatus for generating configuration file
CN109992349A (en) * 2019-04-11 2019-07-09 睿驰达新能源汽车科技(北京)有限公司 A kind of edit methods and device of prompt information of valuating
CN110222281A (en) * 2019-06-03 2019-09-10 贝壳技术有限公司 Object content localization method and system in webpage
CN111045645A (en) * 2019-11-08 2020-04-21 贝壳技术有限公司 Page editing method and device, electronic equipment and storage medium
CN111045645B (en) * 2019-11-08 2021-07-02 贝壳找房(北京)科技有限公司 Page editing method and device, electronic equipment and storage medium
CN111488405A (en) * 2020-04-16 2020-08-04 北京字节跳动网络技术有限公司 Information updating method and device
CN113657079A (en) * 2021-07-26 2021-11-16 浙江中控技术股份有限公司 Industrial process editing system for tank field management
CN113657079B (en) * 2021-07-26 2024-02-02 浙江中控技术股份有限公司 Industrial flow editing system for tank farm management

Also Published As

Publication number Publication date
CN106844635B (en) 2020-04-07

Similar Documents

Publication Publication Date Title
CN106844635A (en) The edit methods and device of the element in webpage
CN104077387B (en) A kind of web page contents display methods and browser device
US10110966B2 (en) Method, device, server and client device for video processing
US20120197855A1 (en) Method and Apparatus of Generating Internet Navigation Page
CN104657451B (en) The processing method and processing device of the page
CN104331474A (en) Page processing method and device
CN106708502B (en) Webpage processing method and device
CN104281677A (en) Page displaying method and device
CN104035753A (en) Double-WebView customized page display method and system
CN105677654B (en) Advertisement filtering method and device
CN102306174A (en) Method and equipment for interacting with user based on web page elements
CN103258534A (en) Voice command recognition method and electronic device
CN102411614A (en) Display Of Image Search Results
CN104145265A (en) Systems and methods involving features of seach and/or search integration
CN107239546A (en) A kind of method of webpage local content tracking with reminding
CN103246678A (en) Method and device for previewing web page contents
CN103838862B (en) Video searching method, device and terminal
CN110245069A (en) The methods of exhibiting and device of the test method and device of page versions, the page
CN105095374A (en) Method and device for browsing mobile terminal news
CN101963992A (en) Method and browser for increasing webpage display speed
CN106293705A (en) A kind of collecting method and mobile terminal
CN105224657A (en) A kind of information recommendation method based on search engine and electronic equipment
JP5136087B2 (en) Client device and client control program
CN102999576A (en) Method and equipment for confirming page description information corresponding to target pages
CN105468627A (en) Method and system for shielding and filtering web page contents

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