CN106874061A - webpage generating method and device - Google Patents

webpage generating method and device Download PDF

Info

Publication number
CN106874061A
CN106874061A CN201710192741.8A CN201710192741A CN106874061A CN 106874061 A CN106874061 A CN 106874061A CN 201710192741 A CN201710192741 A CN 201710192741A CN 106874061 A CN106874061 A CN 106874061A
Authority
CN
China
Prior art keywords
code
preset function
component
original source
source code
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201710192741.8A
Other languages
Chinese (zh)
Inventor
卢山
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Xiaomi Mobile Software Co Ltd
Original Assignee
Beijing Xiaomi Mobile Software 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 Beijing Xiaomi Mobile Software Co Ltd filed Critical Beijing Xiaomi Mobile Software Co Ltd
Priority to CN201710192741.8A priority Critical patent/CN106874061A/en
Publication of CN106874061A publication Critical patent/CN106874061A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/40Transformation of program code
    • G06F8/41Compilation
    • G06F8/44Encoding
    • G06F8/447Target code generation
    • 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/955Retrieval from the web using information identifiers, e.g. uniform resource locators [URL]
    • G06F16/9566URL specific, e.g. using aliases, detecting broken or misspelled links

Abstract

The disclosure is directed to webpage generating method and device.The method includes:The component of preset function is added in original source code, wherein, the component of preset function is used to represent the content of preset function;Component according to preset function obtains code corresponding with preset function, and then the display webpage of browser is obtained according to code corresponding with preset function and original source code.Wherein it is possible to by the corresponding code wrap of preset function into the component of preset function, such that it is able to directly add in original source code the component of preset function, and without directly adding the code of preset function, effectively improve the efficiency of webpage development.

Description

Webpage generating method and device
Technical field
This disclosure relates to field of computer technology, more particularly to webpage generating method and device.
Background technology
With the development of computer and Internet technology, network has become an indispensable part in people's life, Wherein, it is one of means that user uses network to carry out web page browsing by network.
At present, webpage is typically all directly to write out code corresponding with webpage using Web-Page Software by developer, And then Web-Page Software is compiled and the operation such as code conversion to the code that developer writes out, and just can obtain people institute The webpage seen.
The content of the invention
To overcome problem present in correlation technique, the embodiment of the present disclosure to provide webpage generating method and device.The skill Art scheme is as follows:
According to the first aspect of the embodiment of the present disclosure, there is provided a kind of webpage generating method, including:
The component of preset function is added in original source code, the component of the preset function is used to represent the default work( The content of energy;
Component according to the preset function obtains code corresponding with the preset function;
The display webpage of browser is obtained according to code corresponding with the preset function and the original source code.
The technical scheme provided by this disclosed embodiment can include the following benefits:Added in original source code pre- If the component of function, wherein, the component of preset function is used to represent the content of preset function;Component according to preset function is obtained Code corresponding with preset function, and then the display of browser is obtained according to code corresponding with preset function and original source code Webpage.Wherein it is possible to by the corresponding code wrap of preset function into preset function component, such that it is able to directly by preset function Component add in original source code, and without directly add preset function code, effectively improve the effect of webpage development Rate.
In one embodiment, it is described that code corresponding with the preset function is obtained according to the component of the preset function Including:
Component and default mapping table according to the preset function obtain code corresponding with the preset function, wherein, The default mapping table includes the component of at least one preset function and the corresponding code of at least one preset function, described pre- If mapping table is used to indicate the component code corresponding with least one preset function of at least one preset function Corresponding relation.
The technical scheme provided by this disclosed embodiment can include the following benefits:By the component of preset function and Default mapping table obtains code corresponding with preset function, effectively improves the accuracy of code, and effectively improve webpage Development efficiency.
In one embodiment, it is described that code corresponding with the preset function is obtained according to the component of the preset function Including:
Obtain uniform resource position mark URL corresponding with the component of the preset function;
Code corresponding with the preset function is obtained by the URL.
The technical scheme provided by this disclosed embodiment can include the following benefits:Extend the component of preset function Covering scope, effectively improve the development efficiency of webpage.
In one embodiment, basis code corresponding with the preset function and the original source code obtain clear The display webpage of device look at includes:
According to code corresponding with the preset function and the original source code, obtain corresponding with the original source code Intermediate code;
The display webpage of browser is obtained according to the intermediate code.
The technical scheme provided by this disclosed embodiment can include the following benefits:By preset function corresponding generation Code and original source code constitute intermediate code corresponding with original source code, effectively improve the development efficiency of webpage.
In one embodiment, basis code corresponding with the preset function and the original source code, obtain Intermediate code corresponding with the original source code includes:
Obtain the code matched with the original source code in the corresponding code of the preset function;
According to the code matched with the original source code and the original source code, the intermediate code is obtained.
The technical scheme provided by this disclosed embodiment can include the following benefits:Due to can be by preset function The code that corresponding Code obtaining is matched with original source code, so as to improve the accuracy of compiling, further effectively improves The development efficiency of webpage.
In one embodiment, the display webpage that browser is obtained according to the intermediate code, including:
The recognizable final code of the browser is obtained according to the intermediate code;
The display webpage of browser according to the final code building.
According to the second aspect of the embodiment of the present disclosure, there is provided a kind of page generating means, including:
Add module, the component for adding preset function in original source code, the component of the preset function is used for Represent the content of the preset function;
First acquisition module, the component of the preset function for being added according to the add module obtains pre- with described If the corresponding code of function;
Second acquisition module, for the code corresponding with the preset function that is obtained according to first acquisition module and The original source code obtains the display webpage of browser.
In one embodiment, first acquisition module includes:First acquisition submodule;
First acquisition submodule, for the component of the preset function that is added according to the add module and default Mapping table obtains code corresponding with the preset function, wherein, the default mapping table includes at least one preset function Component and the corresponding code of at least one preset function, the default mapping table be used for indicate at least one preset function Component code corresponding with least one preset function corresponding relation.
In one embodiment, first acquisition module includes:Second acquisition submodule and the 3rd acquisition submodule;
Second acquisition submodule, it is corresponding with the component of the preset function that the add module is added for obtaining Uniform resource position mark URL;
3rd acquisition submodule, for the URL that is obtained by second acquisition submodule obtain with it is described The corresponding code of preset function.
In one embodiment, second acquisition module includes:4th acquisition submodule and the 5th acquisition submodule;
4th acquisition submodule, it is corresponding with the preset function for what is obtained according to first acquisition module Code and the original source code, obtain intermediate code corresponding with the original source code;
5th acquisition submodule, the intermediate code for being obtained according to the 4th acquisition submodule obtains clear Look at the display webpage of device.
In one embodiment, the 4th acquisition submodule includes:6th acquisition submodule and the 7th acquisition submodule;
6th acquisition submodule, for obtaining the preset function corresponding generation that first acquisition module is obtained The code matched with the original source code in code;
7th acquisition submodule, for obtaining with the original source code according to the 6th acquisition submodule The code matched somebody with somebody and the original source code, obtain the intermediate code.
In one embodiment, the 5th acquisition submodule includes:8th acquisition submodule and generation submodule;
8th acquisition submodule, obtain for the intermediate code that is obtained according to the 4th acquisition module described in The recognizable final code of browser;
The generation submodule, for clear described in the described final code building that is obtained according to the 8th acquisition submodule Look at the display webpage of device.
According to the third aspect of the embodiment of the present disclosure, there is provided a kind of auto-building html files device, including:
Processor;
Memory for storing processor-executable instruction;
Wherein, the processor is configured as:
The component of preset function is added in original source code, the component of the preset function is used to represent the default work( The content of energy;
Component according to the preset function obtains code corresponding with the preset function;
The display webpage of browser is obtained according to code corresponding with the preset function and the original source code.
It should be appreciated that the general description of the above and detailed description hereinafter are only exemplary and explanatory, not The disclosure can be limited.
Brief description of the drawings
Accompanying drawing herein is merged in specification and constitutes the part of this specification, shows the implementation for meeting the disclosure Example, and it is used to explain the principle of the disclosure together with specification.
Fig. 1 is the flow chart of the webpage generating method according to an exemplary embodiment.
Fig. 2 is the flow chart of step S102 in webpage generating method according to an exemplary embodiment.
Fig. 3 is the flow chart of step S103 in webpage generating method according to an exemplary embodiment.
Fig. 4 is the flow chart of step S1031 in webpage generating method according to an exemplary embodiment.
Fig. 5 is the flow chart of step S1032 in webpage generating method according to an exemplary embodiment.
Fig. 6 is the schematic diagram of IDE in system framework according to an exemplary embodiment one.
Fig. 7 is the schematic diagram of IDE in system framework according to an exemplary embodiment two.
Fig. 8 is the block diagram of the auto-building html files device according to an exemplary embodiment.
Fig. 9 is the block diagram of the first acquisition module 12 in auto-building html files device according to an exemplary embodiment one.
Figure 10 is the block diagram of the first acquisition module 12 in auto-building html files device according to an exemplary embodiment two.
Figure 11 is the block diagram of the second acquisition module 13 in auto-building html files device according to an exemplary embodiment.
Figure 12 is the block diagram of the 4th acquisition submodule 131 in auto-building html files device according to an exemplary embodiment.
Figure 13 is the block diagram of the 5th acquisition submodule 132 in auto-building html files device according to an exemplary embodiment.
Figure 14 is a kind of block diagram for auto-building html files device 90 according to an exemplary embodiment.
Specific embodiment
Here exemplary embodiment will be illustrated in detail, its example is illustrated in the accompanying drawings.Following description is related to During accompanying drawing, unless otherwise indicated, the same numbers in different accompanying drawings represent same or analogous key element.Following exemplary embodiment Described in implementation method do not represent all implementation methods consistent with the disclosure.Conversely, they be only with it is such as appended The example of the consistent apparatus and method of some aspects described in detail in claims, the disclosure.
Fig. 1 is the flow chart of the webpage generating method according to an exemplary embodiment, as shown in figure 1, the method bag Include following steps S101-S103:
In step S101, the component of preset function is added in original source code, the component of preset function is used to represent The content of preset function.
In step s 102, the component according to preset function obtains code corresponding with preset function.
In step s 103, the display net of browser is obtained according to code corresponding with preset function and original source code Page.
In correlation technique, for the webpage for obtaining showing to user in browser, net is typically all utilized by developer Page exploitation software a line a line writes out the corresponding source code of webpage, and then the initial source write out to developer by Web-Page Software Code is compiled, and finally gives the webpage shown to user in browser.Because code is all by the row write of developer's a line one Out, but typically webpage can include substantial amounts of original source code, and huge workload is easily caused the appearance of mistake, so as to make When being compiled to the original source code that developer writes out with Web-Page Software, it may appear that the problem for reporting an error, and now develop Person also needs a line a line to go to check the source code oneself write so that the workload of developer is excessive, and operating efficiency is relatively low, and then So that the development efficiency of webpage is relatively low.
And be the component of preset function by by the code wrap of preset function in the disclosure, when developer is writing webpage When source code, can be without writing out the code of preset function, only need to be by the component of the preset function added in source code Corresponding position, because the code of preset function is all finished writing in advance, therefore be not in clerical error problem, have Effect alleviates the workload of developer, and improves the operating efficiency of developer, and then effectively improves the efficiency of webpage development.
For example:If developer will add a search display function in webpage, then developer just needs in correlation technique Following codes are write out in original source code:
And can be a function of search component by above-mentioned code wrap in the disclosure<Function of search>, now developer only Need to be in the above-mentioned function of search component of the addition of original source code<Function of search>, and above-mentioned lines of code need not be write out, Effectively improve the efficiency of webpage development.Original source code now is as follows:
<div>
<Function of search>
</div>
The embodiment of the present disclosure provides a kind of webpage generating method, including:The group of preset function is added in original source code Part, wherein, the component of preset function is used to represent the content of preset function;Component according to preset function is obtained and preset function Corresponding code, and then the display webpage of browser is obtained according to code corresponding with preset function and original source code.Wherein, Can by the corresponding code wrap of preset function into preset function component, such that it is able to directly the component of preset function is added In original source code, and without directly adding the code of preset function, effectively improve the efficiency of webpage development.
In a kind of achievable mode, above-mentioned steps S102 can be accomplished by the following way:
Component and default mapping table according to preset function obtain code corresponding with preset function, wherein, preset mapping Table includes the component of at least one preset function and the corresponding code of at least one preset function, and default mapping table is used to indicate The corresponding relation of the component of at least one preset function code corresponding with least one preset function.
In order to obtain the code of preset function corresponding with the component of preset function, mapping table can be preset, The component code corresponding with preset function of preset function can be included in the default mapping table, for example, preset mapping table can be with As shown in table 1,
Table 1
For example:During being compiled to following original source codes,
<div>
<Function of search>
</div>
It was found that including the component of preset function<Function of search>, now, meeting basis from table 1<Function of search>Search With<Function of search>The corresponding code of preset function of matching, after preset function corresponding code is found, by code addition To the corresponding position of original source code, following codes are obtained:
Wherein, the component of above-mentioned preset function can not only correspond to one section of code, can also correspond to a label.
Moreover, it is also possible to the correspondence customized label of developer.
The literary style of developer's customized label can be such as:<Calendar from=" 2016-09-08 " ...>;This shows Example be by the function package of calendar into<Calendar>Label is write in source code, and the component correspondence one of each preset function is certainly Define label.
The technical scheme provided by this disclosed embodiment can include the following benefits:By the component of preset function and Default mapping table obtains code corresponding with preset function, effectively improves the accuracy of code, and effectively improve webpage Development efficiency.
In the above-described embodiments, other modes can be first passed through and obtain corresponding with preset function code, so will with it is pre- If the component of the corresponding code of function and preset function is stored in default mapping table, so as to directly pre- from this when compiling If obtaining corresponding with preset function code in mapping table, but if by the corresponding code of all of preset function and preset function Component be maintained in default mapping table, substantial amounts of internal memory can be occupied.
In the achievable mode of another kind, as shown in Fig. 2 above-mentioned steps S102 may comprise steps of S1021- steps S1022:
In step S1021, URL (Uniform corresponding with the component of preset function is obtained Resource Locator, referred to as:URL).
In step S1022, code corresponding with preset function is obtained by URL.
In the present embodiment, the corresponding code of preset function can be obtained in the way of linking, for example:The component of preset function A URL can be corresponded to, the corresponding code of preset function can be stored in the URL, during to compilation of source code, if detection Include the component of preset function to original source code, it is determined that the corresponding URL of component of the preset function, and obtained from the URL The corresponding code of preset function is taken, correspondence position of the corresponding code of the preset function that will be obtained added to source code.
In a kind of achievable mode, URL mapping tables as shown in table 2 can be preserved, when it is determined that original source code includes After the component of preset function, the corresponding URL of component of the preset function is determined according to table 2, and then default work(is obtained by the URL Can corresponding code.
Table 2
The component of preset function URL
<Function of search> aaa.bbb.ccc.ddd
…… ……
In this kind of achievable mode, it may be possible to due to not preserving above-mentioned default mapping table, or, in the mapping table not Find the component of preset function.
The technical scheme provided by this disclosed embodiment can include the following benefits:Extend the component of preset function Covering scope, effectively improve the development efficiency of webpage.
In a kind of achievable mode, as shown in figure 3, above-mentioned steps S103 may be embodied as step S1031- steps S1032:
In step S1031, according to code corresponding with preset function and original source code, obtain and original source code pair The intermediate code answered.
In step S1032, the display webpage of browser is obtained according to intermediate code.
After preset function corresponding code is obtained according to the component of preset function, can be by the corresponding code of the preset function Added to the correspondence position of original source code, so that the corresponding code of the preset function and original source code composition and initial source generation The corresponding intermediate code of code.
The technical scheme provided by this disclosed embodiment can include the following benefits:By preset function corresponding generation Code and original source code constitute intermediate code corresponding with original source code, effectively improve the development efficiency of webpage.
In a kind of achievable mode, as shown in figure 4, above-mentioned step S1031 may be embodied as step S10311- steps S10312:
In step S10311, the code matched with original source code in the corresponding code of preset function is obtained.
In step S10312, according to the code and original source code that are matched with original source code, intermediate code is obtained.
It is above-mentioned during intermediate code is obtained, the corresponding code of preset function and the original source code that may be obtained Type is not no, or including some not no codes of the type with original source code, then, now it is capable of achieving side in one kind In formula, those codes not no with the type of original source code can be rejected, or, will be not no with the type of original source code Code conversion is the type identical code with original source code.
The technical scheme provided by this disclosed embodiment can include the following benefits:Due to can be by preset function The code that corresponding Code obtaining is matched with original source code, so as to improve the accuracy of compiling, further effectively improves The development efficiency of webpage.
In a kind of achievable mode, as shown in figure 5, above-mentioned step S1032 may be embodied as step S10321- steps S10322:
In step S10321, the recognizable final code of browser is obtained according to intermediate code.
In step S10322, according to the display webpage of final code building browser.
After intermediate code is obtained according to above-described embodiment, the intermediate code can be converted to recognizable final of browser Code, the final code include HTML (HyperText Markup Language, referred to as:HTML)、 JavaScript is (referred to as:JS) and CSS (Cascading Style Sheets, referred to as:CSS).
The embodiment of the present disclosure also provides a kind of system framework for auto-building html files, the system framework include one it is integrated Development environment (Integrated Development Environment, referred to as:IDE), a transfer interpreter and a component Exploitation grammer.Fig. 6 is the schematic diagram of IDE in system framework according to an exemplary embodiment, such as Fig. 6 institutes Show, the IDE includes:The component viewing area of preset function and source code editing area.Wherein, the group of preset function Part is illustrated by taking function of search and calendar function as an example.
Wherein, the component of preset function can be created using the corresponding Components Development grammer oneself of the system framework, also may be used It is done to be multiplexed others.A Component Gallery can also be provided in the system framework to share for developer, developer also can be certainly Share the component of the preset function of oneself in oneself open source projects.
When developer writes original source code, the corresponding original source code of function of search is write if desired, as shown in fig. 7, Then directly the function of search component in the component viewing area of preset function is drawn in source code editing area in original source code Need to add the position of function of search code, now the system framework just rapid configuration function of search by the way of What You See Is What You Get The attribute and event binding of component.After original source code writes, the original source code is compiled, in the compilation phase, is System can download the corresponding code of preset function according to the corresponding URL of component of preset function, and system can be corresponding to preset function Code is optimized, so that the function being not called upon is written into intermediate code, and then according to original source code and optimization The corresponding code of preset function afterwards obtains intermediate code;Finally, transfer interpreter is available most according to intermediate code generation browser Whole code, finally, the webpage that browser shows is obtained according to the final code.
It is worth noting that, above-mentioned system framework can also be supported to use other language development components, such as Java and C#, Form only need to be defined.
Using the method in the disclosure so that effectively improved in the efficiency of auto-building html files, and cause the process of auto-building html files What is become is simple and quick and not error-prone, and the component of the preset function in the disclosure can be extended, and not limit to and some Among classification, so that said system is with good expansibility and maintainable, and when other big systems expand Can well adapt to.
Following is disclosure device embodiment, can be used for performing method of disclosure embodiment.
Fig. 8 is the block diagram of the auto-building html files device according to an exemplary embodiment.As shown in figure 8, the auto-building html files Device includes:
Add module 11, the component for adding preset function in original source code, the component of the preset function is used In the content for representing the preset function;
First acquisition module 12, the component of the preset function for being added according to the add module 11 is obtained and institute State the corresponding code of preset function;
Second acquisition module 13, for the code corresponding with the preset function obtained according to first acquisition module With the display webpage that the original source code obtains browser.
In one embodiment, as shown in figure 9, first acquisition module 12 includes:First acquisition submodule 121;
First acquisition submodule 121, the component of the preset function for being added according to the add module 11 Code corresponding with the preset function is obtained with default mapping table, wherein, the default mapping table includes that at least one is pre- If the component of function and the corresponding code of at least one preset function, the default mapping table is used to indicating described at least one pre- If the corresponding relation of the component of function code corresponding with least one preset function.
In one embodiment, as shown in Figure 10, first acquisition module 12 includes:The He of second acquisition submodule 122 3rd acquisition submodule 123;
Second acquisition submodule 122, the group for obtaining the preset function added with the add module 11 The corresponding uniform resource position mark URL of part;
3rd acquisition submodule 123, the URL for being obtained by second acquisition submodule 122 is obtained Code corresponding with the preset function.
In one embodiment, as shown in figure 11, second acquisition module 13 includes:The He of 4th acquisition submodule 131 5th acquisition submodule 132;
4th acquisition submodule 131, for obtaining with the preset function according to first acquisition module 12 Corresponding code and the original source code, obtain intermediate code corresponding with the original source code;
5th acquisition submodule 132, for the intermediate code obtained according to the 4th acquisition submodule 131 Obtain the display webpage of browser.
In one embodiment, as shown in figure 12, the 4th acquisition submodule 131 includes:6th acquisition submodule 1311 and the 7th acquisition submodule 1312;
6th acquisition submodule 1311, for obtaining the preset function pair that first acquisition module 12 is obtained The code matched with the original source code in the code answered;
7th acquisition submodule 1312, it is initial with described for being obtained according to the 6th acquisition submodule 1311 The code and the original source code of source code matching, obtain the intermediate code.
In one embodiment, as shown in figure 13, the 5th acquisition submodule 132 includes:8th acquisition submodule 1321 and generation submodule 1322;
8th acquisition submodule 1321, for the described middle generation obtained according to the 4th acquisition submodule 131 Code obtains the recognizable final code of the browser;
The generation submodule 1322, for the described final code life obtained according to the 8th acquisition submodule 1321 Into the display webpage of the browser.
On the device in above-described embodiment, wherein modules perform the concrete mode of operation in relevant the method Embodiment in be described in detail, explanation will be not set forth in detail herein.
According to the third aspect of the embodiment of the present disclosure, there is provided a kind of auto-building html files device, including:
Processor;
Memory for storing processor-executable instruction;
Wherein, processor is configured as:
The component of preset function is added in original source code, the component of the preset function is used to represent the default work( The content of energy;
Component according to the preset function obtains code corresponding with the preset function;
The display webpage of browser is obtained according to code corresponding with the preset function and the original source code.
Above-mentioned processor is also configured to:
It is described to be included according to the component of preset function acquisition code corresponding with the preset function:
Component and default mapping table according to the preset function obtain code corresponding with the preset function, wherein, The default mapping table includes the component of at least one preset function and the corresponding code of at least one preset function, described pre- If mapping table is used to indicate the component code corresponding with least one preset function of at least one preset function Corresponding relation.
It is described to be included according to the component of preset function acquisition code corresponding with the preset function:
Obtain uniform resource position mark URL corresponding with the component of the preset function;
Code corresponding with the preset function is obtained by the URL.
Basis code corresponding with the preset function and the original source code obtain the display webpage of browser Including:
According to code corresponding with the preset function and the original source code, obtain corresponding with the original source code Intermediate code;
The display webpage of browser is obtained according to the intermediate code.
Basis code corresponding with the preset function and the original source code, obtain and the original source code Corresponding intermediate code includes:
Obtain the code matched with the original source code in the corresponding code of the preset function;
According to the code matched with the original source code and the original source code, the intermediate code is obtained.
The display webpage that browser is obtained according to the intermediate code, including:
The recognizable final code of the browser is obtained according to the intermediate code;
The display webpage of browser according to the final code building.
On the device in above-described embodiment, wherein modules perform the concrete mode of operation in relevant the method Embodiment in be described in detail, explanation will be not set forth in detail herein.
Figure 14 is a kind of block diagram for auto-building html files device 90 according to an exemplary embodiment.Device 90 includes Processing assembly 902, it further includes one or more processors, and the memory resource as representated by memory 903, uses Can be by the instruction of the execution of processing assembly 902, such as application program in storage.The application program stored in memory 903 can be with Including it is one or more each correspond to the module of one group of instruction.Additionally, processing assembly 902 is configured as execution referring to Order, to perform the above method.
Device 90 can also include that a power supply module 906 is configured as the power management of performs device 90, and one wired Or radio network interface 905 is configured as device 90 being connected to network, and input and output (I/O) interface 908.Device 90 Can operate based on storage memory 903 operating system, such as Windows ServerTM, Mac OS XTM, UnixTM, LinuxTM, FreeBSDTM or similar.
A kind of non-transitorycomputer readable storage medium, when the instruction in the storage medium is by the processor of device 90 During execution so that device 90 is able to carry out above-mentioned webpage generating method, methods described includes:
The component of preset function is added in original source code, the component of the preset function is used to represent the default work( The content of energy;
Component according to the preset function obtains code corresponding with the preset function;
The display webpage of browser is obtained according to code corresponding with the preset function and the original source code.
It is described to be included according to the component of preset function acquisition code corresponding with the preset function:
Component and default mapping table according to the preset function obtain code corresponding with the preset function, wherein, The default mapping table includes the component of at least one preset function and the corresponding code of at least one preset function, described pre- If mapping table is used to indicate the component code corresponding with least one preset function of at least one preset function Corresponding relation.
It is described to be included according to the component of preset function acquisition code corresponding with the preset function:
Obtain uniform resource position mark URL corresponding with the component of the preset function;
Code corresponding with the preset function is obtained by the URL.
Basis code corresponding with the preset function and the original source code obtain the display webpage of browser Including:
According to code corresponding with the preset function and the original source code, obtain corresponding with the original source code Intermediate code;
The display webpage of browser is obtained according to the intermediate code.
Basis code corresponding with the preset function and the original source code, obtain and the original source code Corresponding intermediate code includes:
Obtain the code matched with the original source code in the corresponding code of the preset function;
According to the code matched with the original source code and the original source code, the intermediate code is obtained.
The display webpage that browser is obtained according to the intermediate code, including:
The recognizable final code of the browser is obtained according to the intermediate code;
The display webpage of browser according to the final code building.
Those skilled in the art will readily occur to its of the disclosure after considering specification and putting into practice disclosure disclosed herein Its embodiment.The application is intended to any modification, purposes or the adaptations of the disclosure, these modifications, purposes or Person's adaptations follow the general principle of the disclosure and including the undocumented common knowledge in the art of the disclosure Or conventional techniques.Description and embodiments are considered only as exemplary, and the true scope of the disclosure and spirit are by following Claim is pointed out.
It should be appreciated that the disclosure is not limited to the precision architecture for being described above and being shown in the drawings, and And can without departing from the scope carry out various modifications and changes.The scope of the present disclosure is only limited by appended claim.

Claims (13)

1. a kind of webpage generating method, it is characterised in that including:
The component of preset function is added in original source code, the component of the preset function is used to represent the preset function Content;
Component according to the preset function obtains code corresponding with the preset function;
The display webpage of browser is obtained according to code corresponding with the preset function and the original source code.
2. method according to claim 1, it is characterised in that it is described according to the component of the preset function obtain with it is described The corresponding code of preset function includes:
Component and default mapping table according to the preset function obtain code corresponding with the preset function, wherein, it is described Default mapping table includes the component of at least one preset function and the corresponding code of at least one preset function, and described presetting is reflected Firing table is used to indicate the corresponding of the component code corresponding with least one preset function of at least one preset function Relation.
3. method according to claim 1, it is characterised in that it is described according to the component of the preset function obtain with it is described The corresponding code of preset function includes:
Obtain uniform resource position mark URL corresponding with the component of the preset function;
Code corresponding with the preset function is obtained by the URL.
4. method according to claim 1, it is characterised in that basis code corresponding with the preset function and institute The display webpage for stating original source code acquisition browser includes:
According to code corresponding with the preset function and the original source code, during acquisition is corresponding with the original source code Between code;
The display webpage of browser is obtained according to the intermediate code.
5. method according to claim 4, it is characterised in that basis code corresponding with the preset function and institute Original source code is stated, obtaining intermediate code corresponding with the original source code includes:
Obtain the code matched with the original source code in the corresponding code of the preset function;
According to the code matched with the original source code and the original source code, the intermediate code is obtained.
6. method according to claim 4, it is characterised in that the display that browser is obtained according to the intermediate code Webpage, including:
The recognizable final code of the browser is obtained according to the intermediate code;
The display webpage of browser according to the final code building.
7. a kind of auto-building html files device, it is characterised in that including:
Add module, the component for adding preset function in original source code, the component of the preset function is used to represent The content of the preset function;
First acquisition module, the component of the preset function for being added according to the add module is obtained and the default work( Can corresponding code;
Second acquisition module, for the code corresponding with the preset function that is obtained according to first acquisition module and described Original source code obtains the display webpage of browser.
8. device according to claim 7, it is characterised in that first acquisition module includes:First acquisition submodule;
First acquisition submodule, the component of the preset function for being added according to the add module maps with default Table obtains code corresponding with the preset function, wherein, the default mapping table includes the group of at least one preset function Part and the corresponding code of at least one preset function, the default mapping table are used to indicate the group of at least one preset function The corresponding relation of part code corresponding with least one preset function.
9. device according to claim 7, it is characterised in that first acquisition module includes:Second acquisition submodule With the 3rd acquisition submodule;
Second acquisition submodule, for obtaining system corresponding with the component of the preset function that the add module is added One URLs URL;
3rd acquisition submodule, the URL for being obtained by second acquisition submodule obtains default with described The corresponding code of function.
10. device according to claim 7, it is characterised in that second acquisition module includes:4th acquisition submodule With the 5th acquisition submodule;
4th acquisition submodule, for the code corresponding with the preset function obtained according to first acquisition module With the original source code, intermediate code corresponding with the original source code is obtained;
5th acquisition submodule, the intermediate code for being obtained according to the 4th acquisition submodule obtains browser Display webpage.
11. devices according to claim 10, it is characterised in that the 4th acquisition submodule includes:6th obtains son Module and the 7th acquisition submodule;
6th acquisition submodule, in the corresponding code of the preset function for obtaining the first acquisition module acquisition The code matched with the original source code;
7th acquisition submodule, for being matched with the original source code of being obtained according to the 6th acquisition submodule Code and the original source code, obtain the intermediate code.
12. devices according to claim 10, it is characterised in that the 5th acquisition submodule includes:8th obtains son Module and generation submodule;
8th acquisition submodule, for the intermediate code that is obtained according to the 4th acquisition module obtain described in browse The recognizable final code of device;
The generation submodule, for browser described in the described final code building that is obtained according to the 8th acquisition submodule Display webpage.
A kind of 13. auto-building html files devices, it is characterised in that including:
Processor;
Memory for storing processor-executable instruction;
Wherein, the processor is configured as:
The component of preset function is added in original source code, the component of the preset function is used to represent the preset function Content;
Component according to the preset function obtains code corresponding with the preset function;
The display webpage of browser is obtained according to code corresponding with the preset function and the original source code.
CN201710192741.8A 2017-03-28 2017-03-28 webpage generating method and device Pending CN106874061A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710192741.8A CN106874061A (en) 2017-03-28 2017-03-28 webpage generating method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710192741.8A CN106874061A (en) 2017-03-28 2017-03-28 webpage generating method and device

Publications (1)

Publication Number Publication Date
CN106874061A true CN106874061A (en) 2017-06-20

Family

ID=59160274

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710192741.8A Pending CN106874061A (en) 2017-03-28 2017-03-28 webpage generating method and device

Country Status (1)

Country Link
CN (1) CN106874061A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108334379A (en) * 2018-01-05 2018-07-27 北京明略软件系统有限公司 A kind of implementation method and realization device of page expansion function

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102043626A (en) * 2010-12-23 2011-05-04 中国农业银行股份有限公司 Method and device for encapsulating extjs component, and method and system for generating user interface
CN102638572A (en) * 2012-03-19 2012-08-15 北京邮电大学 Short-message sending service system based on Web Element mechanism and operating method thereof
CN103345387A (en) * 2013-06-05 2013-10-09 中国电子科技集团公司第十五研究所 Module reuse achievement method based on module packaging
CN103618699A (en) * 2013-11-12 2014-03-05 吴晓军 Method and device for calling component

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102043626A (en) * 2010-12-23 2011-05-04 中国农业银行股份有限公司 Method and device for encapsulating extjs component, and method and system for generating user interface
CN102638572A (en) * 2012-03-19 2012-08-15 北京邮电大学 Short-message sending service system based on Web Element mechanism and operating method thereof
CN103345387A (en) * 2013-06-05 2013-10-09 中国电子科技集团公司第十五研究所 Module reuse achievement method based on module packaging
CN103618699A (en) * 2013-11-12 2014-03-05 吴晓军 Method and device for calling component

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
刘莹: "《高等学校数码设计专业"十二五"规划教材Dreamweaver网页设计与网站开发》", 31 March 2014, 上海交通大学出版社 *

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108334379A (en) * 2018-01-05 2018-07-27 北京明略软件系统有限公司 A kind of implementation method and realization device of page expansion function

Similar Documents

Publication Publication Date Title
CN105824787B (en) A kind of control method and system of html template dynamic configuration
KR101908162B1 (en) Live browser tooling in an integrated development environment
Punin et al. LOGML: Log markup language for web usage mining
US8315850B2 (en) Web translation provider
US8131753B2 (en) Apparatus and method for accessing and indexing dynamic web pages
CN107766344B (en) Template rendering method and device and browser
Punin et al. Web usage mining—Languages and algorithms
CN102289376A (en) Embedded multi-language WEB page realization method and system
CN104731589A (en) Automatic generation method and device of user interface (UI)
CN109657103A (en) Conversion method, device, computer equipment and the storage medium of data structure
CN103500087A (en) Code generation method and device based on maven plug-in and freemarker template
CN103383645A (en) Code generation method and system
CN103186670A (en) Method and system for integrally acquiring webpage information
CN109240692A (en) A kind of method for building up and system of the web database exploitation based on common template
CN105447198A (en) Convenient page script importing method and device
CN112016283A (en) Form generation method and device
CN109787974A (en) Message data stream generating method, device, computer equipment and storage medium
CN104899217B (en) A kind of implementation method and device of custom feature
Guirguis et al. A smart framework for web content and resources adaptation in mobile devices
KR20120122959A (en) Method and Device for Collecting Web Contents and Computer-readable Recording Medium for the same
CN109558123A (en) The method of webpage conversion electrons book, electronic equipment, storage medium
CN106874061A (en) webpage generating method and device
CN106156128A (en) A kind of realize website multi-lingual mention multiple domain name service method and device
CN110457635A (en) A kind of webpage generating method and system
US9195940B2 (en) Jabba-type override for correcting or improving output of a model

Legal Events

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

Application publication date: 20170620

RJ01 Rejection of invention patent application after publication