CN107943465A - A kind of method and device for generating HTML form - Google Patents

A kind of method and device for generating HTML form Download PDF

Info

Publication number
CN107943465A
CN107943465A CN201711486829.7A CN201711486829A CN107943465A CN 107943465 A CN107943465 A CN 107943465A CN 201711486829 A CN201711486829 A CN 201711486829A CN 107943465 A CN107943465 A CN 107943465A
Authority
CN
China
Prior art keywords
html
target
templat
generation
json data
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
CN201711486829.7A
Other languages
Chinese (zh)
Other versions
CN107943465B (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.)
Beijing Qihoo Technology Co Ltd
Original Assignee
Beijing Qihoo Technology 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 Qihoo Technology Co Ltd filed Critical Beijing Qihoo Technology Co Ltd
Priority to CN201711486829.7A priority Critical patent/CN107943465B/en
Publication of CN107943465A publication Critical patent/CN107943465A/en
Application granted granted Critical
Publication of CN107943465B publication Critical patent/CN107943465B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/20Software design
    • 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

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Software Systems (AREA)
  • Data Mining & Analysis (AREA)
  • Stored Programmes (AREA)

Abstract

The embodiment of the present invention provides a kind of method and device for generating HyperText Markup Language HTML form, the described method includes:The generation instruction for being used to generate target HTML form is obtained, wherein, the configured information for identifying target list template is carried in the generation instruction;Based on the configured information and the form templat storehouse prestored, determine that the generation instructs corresponding target list template;Call and be based on the target list template, generate the target HTML form.In this way, generating corresponding target HTML form by the target list template in form templat storehouse, the size of code that developer writes manually can be reduced during HTML form is developed, improve the formation efficiency of HTML form.

Description

A kind of method and device for generating HTML form
Technical field
The present invention relates to HTML (HyperText Markup Language, the supertext mark in internet development field Remember language) technology, more particularly to a kind of method and device for generating HTML form.
Background technology
With information-based development and the popularization of computer technology and Internet technology, the enterprise customers of all trades and professions according to Network is relied to carry out technological innovation and the market expansion, personal user relies on network and carries out information exchange.In practical applications, for root Corresponding service is provided according to different user demands, the enterprise customer of all trades and professions often passes through the HTML in html page List inputs to collect different types of user, and normal carry out of every business such as enterprise's office, O&M becomes increasingly dependent on In the transmission and use of HTML form.
But in the prior art, HTML form be often developer according to user demand, write manually thousands of Capable code generates, but different enterprise, the different departments of same enterprise, even different equipment usually may require that Developer provides the HTML form of different patterns, and especially in mega project, it is more and act on to generally require generation quantity Different HTML form, still, might have in different HTML forms and acts on identical basic Form Element, this When, developer will do the development largely repeated.As it can be seen that there are efficiency to compare for the mode of existing generation HTML form The problem of low.
The content of the invention
In view of this, the embodiment of the present invention provides a kind of method and device for generating HTML form, and main purpose is During developing HTML form, HTML form is generated by default form templat, developer can be reduced and compiled manually The size of code write, realizes the formation efficiency for improving HTML form.
To reach above-mentioned purpose, the embodiment of the present invention mainly provides following technical solution:
In a first aspect, the embodiment of the present invention provides a kind of method for generating HTML form, the described method includes:It is used for The generation instruction of target HTML form is generated, wherein, the finger for identifying target list template is carried in the generation instruction Show information;Based on the configured information and the form templat storehouse prestored, determine that the generation instructs corresponding target list Template;Call and be based on the target list template, generate the target HTML form.
Second aspect, the embodiment of the present invention provide a kind of device for generating HTML form, and described device includes:Obtain single Member, determination unit and generation unit, wherein, the obtaining unit, for obtaining the generation for being used for generating target HTML form Instruction, wherein, the configured information for identifying target list template is carried in the generation instruction;The determination unit, is used In based on the configured information and the form templat storehouse prestored, determine that the generation instructs corresponding target list template; The generation unit, for calling and being based on the target list template, generates the target HTML form.
The third aspect, the embodiment of the present invention provide a kind of storage medium, and the storage medium includes the program of storage, its In, the method for the above-mentioned generation HTML form of equipment execution where the storage medium is controlled when described program is run.
Fourth aspect, the embodiment of the present invention provide a kind of processor, and the processor is used for operation program, wherein, it is described The method that program performs above-mentioned generation HTML form when running.
A kind of method and device for generating HTML form provided in an embodiment of the present invention, is used to generate target HTML obtaining After the generation instruction of list, wherein, the configured information for identifying target list template is carried in generation instruction, it is possible to base In configured information and the form templat storehouse prestored, determine that generation instructs corresponding target list template, finally, call simultaneously Based on target list template, target HTML form is generated.In this way, by then pass through the target list template in form templat storehouse Lai Corresponding target HTML form is generated, so that, during HTML form is developed, developer can be reduced and write manually Size of code, realize improve HTML form formation efficiency.
Brief description of the drawings
By reading the detailed description of hereafter preferred embodiment, it is various other the advantages of and benefit it is common for this area Technical staff will be clear understanding.Attached drawing is only used for showing the purpose of preferred embodiment, and is not considered as to the present invention Limitation.And in whole attached drawing, identical component is denoted by the same reference numerals.In the accompanying drawings:
Fig. 1 shows the flow diagram of the method for the generation HTML form in the embodiment of the present invention one;
Fig. 2 shows the schematic diagram of the HTML form in the embodiment of the present invention one;
Fig. 3 shows the structure diagram of the device of the generation HTML form in the embodiment of the present invention two;
Fig. 4 shows the structure diagram of the equipment of the generation HTML form in the embodiment of the present invention three.
Embodiment
The exemplary embodiment of the present invention is more fully described below with reference to accompanying drawings.Although the present invention is shown in attached drawing Exemplary embodiment, it being understood, however, that may be realized in various forms the present invention without should be by embodiments set forth here Limited.Conversely, there is provided these embodiments are to be able to be best understood from the present invention, and can be by the scope of the present invention Completely it is communicated to those skilled in the art.
Embodiment one
The embodiment of the present invention provides a kind of method for generating HTML form, and the method for the generation HTML form can be applied to The various occasions for needing to quickly generate HTML form, as included the more HTML table of quantity or species in a html page The Form Element demand shift of HTML form needed for single, enterprises service part is bigger, by amateur programming personnel to original A certain Form Element in HTML form is modified.
Fig. 1 is the flow diagram of the method for the generation HTML form in the embodiment of the present invention one, shown in Figure 1, should The method of generation HTML form includes:
S101:Obtain the generation instruction for being used to generate target HTML form;
Wherein, the configured information for identifying target list template is carried in generation instruction.In practical applications, this refers to It can be text information to show information, such as the title of target list template, or digital information, such as the sequence of target list template Number, it is, of course, also possible to be the information of other forms, here, the embodiment of the present invention is not specifically limited.
In practical applications, when needing using the target HTML form in html page to collect information, such as IT Information Services Department in (Information Technology, information technology) enterprise needs to receive by target HTML form Collect user in the test information generated during using a certain webpage, developer can generate .html In the editing machine of formatted file, operated during html page is edited, at this time, this will be obtained and be used to generate target The generation instruction of HTML form.
Exemplarily, the common editing machine that can generate .html formatted files can be Web page editor, such as Adobe Dreamweaver, or text editor, such as notepad.It is, of course, also possible to be other editing machines, here, the present invention Embodiment is not specifically limited.
In specific implementation process, above-mentioned HTML form (HTML FORM) refers to include Form Element in html page Region, is mainly used for collecting different types of user's input.Here, Form Element refers to input (input) element, textview field (textarea) element, drop-down list (datalist) element and button (button) element etc..Wherein, input element According to different type attributes, and it can become and turn to variform, input element can include the text field (text), cipher word Section (password), submitting button (submit), reset button (reset), radio button (radio), check box (checkbox), date (date) field etc..
In other embodiments of the present invention, in order to determine form templat storehouse, before above-mentioned S101, above-mentioned generation HTML The method of list further includes:Step 1011:It is respectively each Form Element wound for each Form Element of HTML form Build corresponding first form templat;Step 1012:Corresponding first form templat of each Form Element is stored to table In single template library.
In specific implementation process, for the ease of developer when developing HTML form, developer institute can be reduced The size of code write, can be directed to each Form Element of HTML form in advance, as the text field, password field, submission are pressed Button, textview field, drop-down list etc., write out corresponding first form templat, then, by each table for each Form Element The first form templat corresponding to single element is stored into form templat storehouse, so that, mistake of the developer in subsequent development list Cheng Zhong, if necessary to the Form Element of which type, it is possible to directly call the Form Element to correspond to from form templat storehouse The first form templat, in this manner it is possible to greatly reduce the development of repetition.
In practical applications, generally require for a variety of Form Elements to be combined generated HTML form, or use The HTML form that multiple same Form Elements are generated, could realize the demand of user.For example, use the text field, password Field, submitting button three are combined, and can generate the HTML form for collecting subscriber identity information;Use multiple text words Section is combined, and can generate the HTML form for collecting user's ship-to information.Therefore, in implementation process, in order into One step improve developer development efficiency, except by each Form Element each corresponding to the first form templat be stored in Beyond in form templat storehouse, the form templat of some most common uses can also be stored, is such as used for the table for collecting subscriber identity information Single mode plate, form templat for collecting station address information etc..
So, in specific implementation process, above-mentioned steps 1012 can also include:Each corresponded to from each Form Element The first form templat in, call at least two second form templats;At least two second form templats are combined, are obtained 3rd form templat;Corresponding first form templat of each Form Element and the 3rd form templat are stored to list mould In plate storehouse.
Here, according to the type of Form Element, above-mentioned first form templat can be the corresponding template of the text field, it is close It is the corresponding template of code field, the corresponding template of submitting button, the corresponding template of reset button, the corresponding template of radio button, multiple The corresponding template of frame, the corresponding template of date field etc. are selected, correspondingly, above-mentioned at least two second form templat, Ke Yiwei First form templat of same type, such as corresponding first form templat of two the text fields, or different types of the One form templat, such as corresponding first form templat of a text field and corresponding first form templat of a password field, The embodiment of the present invention is not specifically limited.
Exemplarily, in order to further improve the efficiency of exploitation HTML form, can such as be used according to the purposes to be realized In collecting user's ship-to information, from corresponding first form templat of each Form Element, multiple texts are called First form templat of these multiple file field types, is then combined, in advance by the first form templat of field type It is created that the 3rd form templat for collecting user's ship-to information, it is finally, each Form Element is corresponding First form templat and the 3rd form templat are all stored in form templat storehouse.
In practical applications, due to JSON (JavaScript Object Notation, JavaScript object mark) Data have simple and clear hierarchical structure so that JSON data are easy to read and write, therefore, in order to simplify server end and The code development work of client, easy to relevant staff's real-time servicing HTML form according to demand, can use JSON (JavaScript Object Notation, JavaScript object mark) data represent the form templat of HTML form. Wherein, JavaScript is a kind of computer script language, is widely used in webpage development.
So, in an alternative embodiment of the invention, when each table unit that HTML form is realized using JSON data During plain corresponding first form templat, above-mentioned steps 1011 can include:JSON technologies are marked by JavaScript object, point The other attribute to each Form Element is described, and generates the corresponding first JSON data of each Form Element;Will First JSON data are determined as the first form templat.
Exemplarily, HTML form schematic diagram shown in Figure 2, Form Element 201 are the text words in input element Section, Form Element 202 are the password fields in input element, and Form Element 203 is the number fields in input element, Form Element 204 is the tag fields in input element.Next, referring to shown in table 1 below, with Form Element as shown in Figure 2 Input element exemplified by illustrate how to realize corresponding first form templat of each Form Element using JSON data, i.e., Each corresponding first JSON data of Form Element.Next, in order to generate HTML form as shown in Figure 2, Ke Yicong The first form templat realized in form templat storehouse in call list 1 using JSON data, i.e., each Form Element are corresponding First JSON data.
Table 1
S102:Based on configured information and the form templat storehouse prestored, determine that generation instructs corresponding object table single mode Plate;
Here, after obtaining the generation for generating target HTML form and instructing, carried in being instructed according to the generation For identifying the configured information of target list template, it can determine that the generation instructs from the form templat storehouse prestored Corresponding target list template, to generate corresponding HTML form using the target list template.
In practical applications, it is above-mentioned to deposit in advance for the ease of the HTML form of the different patterns of the self-defined generation of developer It can include corresponding first form templat of each Form Element in the form templat storehouse of storage, in this way, being opened in implementation process Hair personnel can call the form templat needed for different the first form templat combination producings oneself according to the demand of oneself;Together When, for the ease of developer's required HTML form self-defined more quickly, in the above-mentioned form templat storehouse prestored It can include some the 3rd form templats for combining and generating using these first form templats, such as be used for the identity for collecting user The form templat of information, the form templat for collecting test information, form templat for collecting ship-to information etc., In implementation process, corresponding HTML form can just be generated by running these the 3rd form templats, as run and be used to collect user The form templat of identity information will generate the corresponding HTML form that user name and login password are inputted for user.
In specific implementation process, when the first form templat in form templat storehouse is realized particular by JSON data When, above-mentioned S102 can include:The configured information carried in being instructed according to generation, each table stored from form templat storehouse In the corresponding first JSON data of single element, determine that generation instructs corresponding 2nd JSON data;Obtain and be directed to second The operation of JSON data;Response operation, modifies the attribute information of Form Element in the 2nd JSON data, obtains the 3rd JSON data;3rd JSON data are determined as target list template.
Exemplarily, referring still to shown in upper table 1, the table unit in the first JSON data corresponding to a Form Element The attribute information of element can be tips, placeholder, label etc..
In practical applications, after HTML form is generated, the word in the attribute information of these Form Elements, such as " verification Be passed to by rules array lists ", " basic text " etc. can be shown on HTML form, therefore, when needing to a certain table unit When the attribute information of element is modified, in corresponding first JSON of each Form Element stored from form templat storehouse In data, after determining that generation instructs corresponding 2nd JSON data, developer can grasp these attribute informations Make, at this time, the operation for the 2nd JSON data will be obtained, then, it is possible to the operation is responded, in the 2nd JSON data Attribute information modify, obtain the 3rd JSON data, finally, the 3rd JSON data are determined as target list template.
Specifically, can be to a certain in Form Element in the 2nd JSON data for the operation of the 2nd JSON data Operation that word in attribute information is updated or delete the attribute information in the 2nd JSON data in Form Element Operation, it is, of course, also possible to be other types of operation, increase the attribute letter of new Form Element as given in the 2nd JSON data The operation of breath, adjust the position of Form Element or the position of attribute information of Form Element etc. in the 2nd JSON data, here, The embodiment of the present invention is not specifically limited.
Exemplarily, referring to shown in upper table 1, it is assumed that the 2nd JSON data are corresponding to number fields as shown in Table 1 The first JSON data when, tips therein can be deleted;Can also " basic number " be updated to by the word in label " numeral ".
Specifically, according to the type of Form Element, above-mentioned first JSON data can be the corresponding JSON numbers of the text field According to, the corresponding JSON data of password field, the corresponding JSON data of submitting button, the corresponding JSON data of reset button, single choice The corresponding JSON data of button, the corresponding JSON data of check box, the corresponding JSON data of date field etc..Correspondingly, on The 2nd JSON data are stated, can be one or more the first JSON data, wherein, when the 2nd JSON data include multiple first During JSON data, the 2nd JSON data can include the first JSON data of same type, and such as two the text fields are corresponding First JSON data, can also include different types of first JSON data, such as corresponding first JSON of a text field Data and the corresponding first JSON data of a password field, the embodiment of the present invention are not specifically limited.
Exemplarily, realized below by when the first form templat in form templat storehouse particular by JSON data When, the process of the HTML form template for collecting subscriber identity information how is generated, to illustrate how based on prestoring Form templat storehouse, determines that generation instructs corresponding target list template.
When user a certain video website webpage version carry out user login operation when, just may require that this be used for log in The password fields of password are inputted on html page with the text fields that user name is inputted for user and for user HTML form.So, the HTML form of identity information can be collected in order to provide the user with, can be grasped on editing machine Make, choose text fields and the corresponding first JSON data of password fields, at this time, will obtain while include 2nd JSON data of text fields and the corresponding first JSON data of password fields, then, developer can With as needed, to adjust the position of text fields and password fields in the 2nd JSON data, alternatively, adjustment second Attribute information of text fields and password fields in JSON data etc., so that it may to obtain the 3rd JSON data, this Sample, just obtains target list template.
Furthermore, it is necessary to explanation, when including the first form templat and three form templats at the same time in form templat storehouse, If the first form templat is realized by JSON data, then, the 3rd form templat is also come real by JSON data Existing, at this time, can also be from corresponding to the 3rd form templat except determining the 2nd JSON data from the first JSON data The 2nd JSON data are determined in JSON data.
S103:Call and be based on target list template, generate target HTML form.
Specifically, after target list template is determined, it is possible to call the target list template, be then based on the target Form templat generates corresponding target HTML form.
In specific implementation process, it is used to generate target HTML form when during html page is edited, obtaining this Generation instruction when, above-mentioned S103 includes:Invocation target form templat, obtains the second source generation corresponding to target HTML form Code;Second source code is added in the 3rd source code corresponding to html page, the 3rd source code after being handled;Operation The 3rd source code after processing, generates target HTML form in html page.
Specifically, when the field that the method for the generation HTML form is applied to editor's html page or generation html page When under scape, after target list template is determined based on form templat storehouse, the target list template will be called, in this way, will The corresponding source code of target HTML form is obtained, next, in order to generate the target HTML form, it is possible to by the target The corresponding source code of HTML form is directly appended in the corresponding source code of html page, alternatively, the source generation in html page The corresponding source code of target HTML form is called in code, it is possible to which acquisition can generate the html page with HTML form The 3rd source code after processing, finally, runs the 3rd source code after the processing, it is possible to the target is generated in html page HTML form.
In specific implementation process, when each form templat stored in the form templat storehouse prestored is logical JSON data are crossed to realize when, above-mentioned S103 can include:3rd JSON data are parsed, the 3rd JSON data are turned It is changed to corresponding first source code of target HTML form;Call and be based on the first source code, generate target HTML form.
In practical applications, if target list template is realized by the 3rd JSON data, the 3rd is being obtained After JSON data, editing machine can parse the 3rd JSON data, obtain corresponding first source code of target HTML form, so Afterwards by calling and generating target HTML form based on first source code.
So far, the process of generation target HTML form is just completed.
As shown in the above, the HTML form generation method that the embodiment of the present invention is provided, is used to generate mesh obtaining After the generation instruction for marking HyperText Markup Language HTML form, wherein, carried in generation instruction for identifying target list The configured information of template, it is possible to based on configured information and the form templat storehouse prestored, determine that generation instructs corresponding mesh Form templat is marked, finally, calls and is based on target list template, generate required target HTML form.In this way, by then passing through Target list template in form templat storehouse generates corresponding target HTML form, so that, apply this method to editor When during html page, the size of code that developer writes manually can be reduced during HTML form is developed, it is real Now improve the formation efficiency of HTML form.
Embodiment two
Based on same inventive concept, as the realization to the above method, an embodiment of the present invention provides a kind of HTML form Generating means, the device embodiment is corresponding with preceding method embodiment, and for ease of reading, present apparatus embodiment is no longer to foregoing side Detail content in method embodiment is repeated one by one, it should be understood that the device in the present embodiment can correspond to realize it is foregoing Full content in embodiment of the method.
Fig. 3 is the structure diagram of the device of the generation HTML form in the embodiment of the present invention two, shown in Figure 3, should The device 30 of generation HTML form includes:Obtaining unit 301, determination unit 302 and generation unit 303, wherein, obtaining unit 301, for obtaining the generation instruction for being used to generate target HTML form, wherein, carried in generation instruction for identifying target The configured information of form templat;Determination unit 302, for based on configured information and the form templat storehouse prestored, determining life Into the corresponding target list template of instruction;Generation unit 303, for calling and being based on target list template, generation target HTML List.
In other embodiments of the present invention, the device of above-mentioned generation HTML form further includes:Creating unit and storage are single Member, wherein, creating unit, is respectively the establishment pair of each Form Element for each Form Element for HTML form The first form templat answered;Storage unit, for storing corresponding first form templat of each Form Element to table In single template library.
In embodiments of the present invention, storage unit, for from corresponding first form templat of each Form Element In, call at least two second form templats;At least two second form templats are combined, obtain the 3rd form templat; Corresponding first form templat of each Form Element and the 3rd form templat are stored into form templat storehouse.
In embodiments of the present invention, creating unit, for marking JSON technologies by JavaScript object, respectively to every A kind of attribute of Form Element is described, and generates the corresponding first JSON data of each Form Element;By first JSON data are determined as the first form templat.
In embodiments of the present invention, determination unit, for according to configured information, each stored from form templat storehouse In the corresponding first JSON data of Form Element, determine that generation instructs corresponding 2nd JSON data;Obtain and be directed to second The operation of JSON data;Response operation, modifies the attribute information of Form Element in the 2nd JSON data, obtains the 3rd JSON data;3rd JSON data are determined as target list template.
In embodiments of the present invention, generation unit, for being parsed to the 3rd JSON data, the 3rd JSON data are turned It is changed to corresponding first source code of target HTML form;Call and be based on the first source code, generate target HTML form.
In embodiments of the present invention, obtaining unit, is used to generate for during html page is edited, obtaining The generation instruction of target HTML form;Generation unit, for invocation target form templat, obtains corresponding to target HTML form Second source code;Second source code is added in the 3rd source code corresponding to html page, the 3rd source after being handled Code;The 3rd source code after operation processing, generates target HTML form in html page.
Above-mentioned list generating means include processor and memory, above-mentioned obtaining unit, determination unit, generation unit, wound Build unit and storage unit etc. to store in memory as program unit, performed by processor stored in memory Above procedure unit realizes corresponding function.
Above-mentioned processor can be by central processing unit (Central Processing Unit, CPU), microprocessor (Micro Processor Unit, MPU), digital signal processor (Digital Signal Processor, DSP) or field-programmable Gate array (Field Programmable Gate Array, FPGA) etc. is realized.
Memory may include the volatile memory in computer-readable medium, random access memory (Random Access Memory, RAM) and/or the form such as Nonvolatile memory, such as read-only storage (Read Only Memory, ROM) Or flash memory (Flash RAM), memory include at least one storage chip.
Based on same inventive concept, the embodiment of the present invention provides a kind of storage medium, is stored thereon with program, the program quilt The method that processor realizes above-mentioned generation HTML form when performing.
Based on same inventive concept, the embodiment of the present invention provides a kind of processor, and processor is used for operation program, wherein, The method that program performs above-mentioned generation HTML form when running.
In practical applications, the device of the generation HTML form can be applied in terminal.Terminal can be come in a variety of manners Implement.For example, terminal described in the present invention can include such as mobile phone, tablet computer, laptop, palm PC, a Personal digital assistant (Personal Digital Assistant, PDA), portable media player (Portable Media Player, PMP), guider, the mobile terminal such as wearable device, and numeral TV, desktop computer, server etc. Fixed terminal.
Embodiment three
Based on same inventive concept, the embodiment of the present invention provides a kind of equipment for generating HTML form.Fig. 4 is real for the present invention The structure diagram of the equipment of the generation HTML form in example three is applied, shown in Figure 4, the equipment 40 of the generation HTML form is wrapped Include:Memory 401, processor 402 and it is stored in the computer program that can be run on memory 401 and on the processor 402 403, when processor executive program 403, realizes following steps:The generation instruction for being used to generate target HTML form is obtained, wherein, The configured information for identifying target list template is carried in the generation instruction;Based on the configured information and prestore Form templat storehouse, determine that the generation instructs corresponding target list template;Call and be based on the target list template, it is raw Into the target HTML form.
In embodiments of the present invention, before the step of above-mentioned acquisition is used for the generation instruction for generating target HTML form, Following steps can be also realized during above-mentioned processor executive program:It is respectively each for each Form Element of HTML form Kind Form Element creates corresponding first form templat;By corresponding first form templat of each Form Element store to In form templat storehouse.
In embodiments of the present invention, following steps can be also realized during above-mentioned processor executive program:From each table unit In corresponding first form templat of element, at least two second form templats are called;By at least two second form templats into Row combination, obtains the 3rd form templat;By corresponding first form templat of each Form Element and the 3rd form templat Store into form templat storehouse.
In embodiments of the present invention, following steps can be also realized during above-mentioned processor executive program:Pass through JavaScript Object tag JSON technologies, are respectively described the attribute of each Form Element, and it is each right to generate each Form Element The first JSON data answered;First JSON data are determined as the first form templat.
In embodiments of the present invention, following steps can be also realized during above-mentioned processor executive program:Believed according to the instruction Cease, in the corresponding first JSON data of each Form Element stored from form templat storehouse, determine generation instruction pair The 2nd JSON data answered;Obtain the operation for the 2nd JSON data;Response operation, to Form Element in the 2nd JSON data Attribute information modify, obtain the 3rd JSON data;3rd JSON data are determined as target list template.
In embodiments of the present invention, following steps can be also realized during above-mentioned processor executive program:To the 3rd JSON Data are parsed, and the 3rd JSON data are converted to corresponding first source code of target HTML form;Call and be based on First source code, generates the target HTML form.
In embodiments of the present invention, following steps can be also realized during above-mentioned processor executive program:In editor's html page During, the generation instruction for being used to generate target HTML form is obtained, wherein, carried in the generation instruction for identifying The configured information of target list template;Based on the configured information and the form templat storehouse prestored, determine that the generation refers to Make corresponding target list template;The target list template is called, obtains the second source corresponding to the target HTML form Code;Second source code is added in the 3rd source code corresponding to the html page, the after being handled the 3rd Source code;The 3rd source code after the processing is run, the target HTML form is generated in the html page.
It should be understood by those skilled in the art that, embodiments herein can be provided as method, system or computer program Product.Therefore, the application can use the reality in terms of complete hardware embodiment, complete software embodiment or combination software and hardware Apply the form of example.Moreover, the application can use the computer for wherein including computer usable program code in one or more Usable storage medium (include but not limited to magnetic disk storage, read-only optical disc (Compact Disc Read-Only Memory, CD-ROM), optical memory etc.) on the form of computer program product implemented.
The application is with reference to the flow according to the method for the embodiment of the present application, equipment (system) and computer program product Figure and/or block diagram describe.It should be understood that it can be realized by computer program instructions every first-class in flowchart and/or the block diagram The combination of flow and/or square frame in journey and/or square frame and flowchart and/or the block diagram.These computer programs can be provided The processors of all-purpose computer, special purpose computer, Embedded Processor or other programmable data processing devices is instructed to produce A raw machine so that the instruction performed by computer or the processor of other programmable data processing devices, which produces, to be used in fact The device for the function of being specified in present one flow of flow chart or one square frame of multiple flows and/or block diagram or multiple square frames.
These computer program instructions, which may also be stored in, can guide computer or other programmable data processing devices with spy Determine in the computer-readable memory that mode works so that the instruction being stored in the computer-readable memory, which produces, to be included referring to Make the manufacture of device, the command device realize in one flow of flow chart or multiple flows and/or one square frame of block diagram or The function of being specified in multiple square frames.
These computer program instructions can be also loaded into computer or other programmable data processing devices so that counted Series of operation steps is performed on calculation machine or other programmable devices to produce computer implemented processing, thus in computer or The instruction performed on other programmable devices is provided and is used for realization in one flow of flow chart or multiple flows and/or block diagram one The step of function of being specified in a square frame or multiple square frames.
In a typical configuration, computing device includes one or more processors (CPU), input/output interface, net Network interface and memory.
Memory may include the volatile memory in computer-readable medium, RAM and/or Nonvolatile memory etc. Form, such as ROM or Flash RAM.Memory is the example of computer-readable medium.
Computer-readable medium includes permanent and non-permanent, removable and non-removable media can be by any method Or technology come realize information store.Information can be computer-readable instruction, data structure, the module of program or other data. Computer-readable recording medium can be ROM, programmable read only memory (Programmable Read-Only Memory, PROM), Erasable Programmable Read Only Memory EPROM (Erasable Programmable Read-Only Memory, EPROM), electricity Erasable Programmable Read Only Memory EPROM (Electrically Erasable Programmable Read-Only Memory, EEPROM), magnetic RAM (Ferromagnetic Random Access Memory, FRAM), flash Device (Flash Memory), magnetic surface storage, CD or read-only optical disc (Compact Disc Read-Only Memory, The memory such as CD-ROM);Can also be fast flash memory bank or other memory techniques, CD-ROM, digital versatile disc (DVD) or Other optical storages, magnetic cassette tape, the storage of tape magnetic rigid disk or other magnetic storage apparatus or any other non-transmission medium, The information that can be accessed by a computing device available for storage;It can also be including one of above-mentioned memory or be combined various Electronic equipment, such as mobile phone, computer, tablet device, personal digital assistant.Defined according to herein, computer can Reading medium does not include temporary computer readable media (transitory media), such as data-signal and carrier wave of modulation.
It should also be noted that, term " comprising ", "comprising" or its any other variant are intended to nonexcludability Comprising so that process, method, commodity or equipment including a series of elements not only include those key elements, but also wrapping Include other elements that are not explicitly listed, or further include for this process, method, commodity or equipment it is intrinsic will Element.In the absence of more restrictions, the key element limited by sentence "including a ...", it is not excluded that including key element Also there are other identical element in process, method, commodity or equipment.
It will be understood by those skilled in the art that embodiments herein can be provided as method, system or computer program product. Therefore, the application can be using the embodiment in terms of complete hardware embodiment, complete software embodiment or combination software and hardware Form.Deposited moreover, the application can use to can use in one or more computers for wherein including computer usable program code The shape for the computer program product that storage media is implemented on (including but not limited to magnetic disk storage, CD-ROM, optical memory etc.) Formula.
It these are only embodiments herein, be not limited to the application.To those skilled in the art, The application can have various modifications and variations.All any modifications made within spirit herein and principle, equivalent substitution, Improve etc., it should be included within the scope of claims hereof.

Claims (10)

  1. A kind of 1. method for generating HyperText Markup Language HTML form, it is characterised in that the described method includes:
    The generation instruction for being used to generate target HTML form is obtained, wherein, carried in the generation instruction for identifying target The configured information of form templat;
    Based on the configured information and the form templat storehouse prestored, determine that the generation instructs corresponding object table single mode Plate;
    Call and be based on the target list template, generate the target HTML form.
  2. 2. according to the method described in claim 1, it is characterized in that, in the generation for obtaining and being used for generating target HTML form Before instruction, the method further includes:
    It is respectively that each Form Element creates corresponding first form templat for each Form Element of HTML form;
    Corresponding first form templat of each Form Element is stored into the form templat storehouse.
  3. It is 3. according to the method described in claim 2, it is characterized in that, described by corresponding first table of each Form Element Single mode plate is stored into the form templat storehouse, including:
    From corresponding first form templat of each Form Element, at least two second form templats are called;
    At least two second form templat is combined, obtains the 3rd form templat;
    Corresponding first form templat of each Form Element and the 3rd form templat are stored to the list mould In plate storehouse.
  4. 4. according to the method described in claim 2, it is characterized in that, described each Form Element for HTML form, divides Not Wei each Form Element create corresponding first form templat, including:
    JSON technologies are marked by JavaScript object, the attribute of each Form Element is described respectively, generation is every A kind of corresponding first JSON data of Form Element;
    The first JSON data are determined as first form templat.
  5. It is 5. according to the method described in claim 4, it is characterized in that, described based on the configured information and the list prestored Template library, determines that the generation instructs corresponding target list template, including:
    According to the configured information, corresponding first JSON of each Form Element stored from the form templat storehouse In data, determine that the generation instructs corresponding 2nd JSON data;
    Obtain the operation for the 2nd JSON data;
    The operation is responded, is modified to the attribute information of Form Element in the 2nd JSON data, obtains the 3rd JSON Data;
    The 3rd JSON data are determined as the target list template.
  6. 6. according to the method described in claim 5, it is characterized in that, it is described call and be based on the target list template, generation The target HTML form, including:
    The 3rd JSON data are parsed, the 3rd JSON data are converted into target HTML form corresponding first Source code;
    Call and be based on first source code, generate the target HTML form.
  7. 7. according to the method described in claim 1, it is characterized in that, the generation obtained for generating target HTML form refers to Order, including:During html page is edited, the generation instruction is obtained;
    It is described to call and be based on the target list template, the target HTML form is generated, including:Call the target list Template, obtains the second source code corresponding to the target HTML form;Second source code is added to the HTML page In the 3rd source code corresponding to face, the 3rd source code after being handled;The 3rd source code after the processing is run, in institute State and the target HTML form is generated in html page.
  8. 8. a kind of device for generating HyperText Markup Language HTML form, it is characterised in that described device includes:Obtain single Member, determination unit and generation unit, wherein,
    The obtaining unit, for obtaining the generation instruction for being used to generate target HyperText Markup Language HTML form;
    The determination unit, for based on the form templat storehouse prestored, determining that the generation instructs corresponding target list Template;
    The generation unit, for calling and being based on the target list template, generates the target HTML form.
  9. A kind of 9. storage medium, it is characterised in that the storage medium includes the program of storage, wherein, run in described program When control the storage medium where equipment perform such as the method for claim 1 to 7 any one of them generation HTML form.
  10. A kind of 10. processor, it is characterised in that the processor is used for operation program, wherein, performed such as when described program is run The method that claim 1 to 7 any one of them generates HTML form.
CN201711486829.7A 2017-12-29 2017-12-29 Method and device for generating HTML (Hypertext markup language) form Expired - Fee Related CN107943465B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201711486829.7A CN107943465B (en) 2017-12-29 2017-12-29 Method and device for generating HTML (Hypertext markup language) form

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201711486829.7A CN107943465B (en) 2017-12-29 2017-12-29 Method and device for generating HTML (Hypertext markup language) form

Publications (2)

Publication Number Publication Date
CN107943465A true CN107943465A (en) 2018-04-20
CN107943465B CN107943465B (en) 2021-07-02

Family

ID=61937134

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201711486829.7A Expired - Fee Related CN107943465B (en) 2017-12-29 2017-12-29 Method and device for generating HTML (Hypertext markup language) form

Country Status (1)

Country Link
CN (1) CN107943465B (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109299448A (en) * 2018-09-12 2019-02-01 武汉轻工大学 Resume intelligence filling method, system, server and storage medium
CN110688600A (en) * 2019-09-09 2020-01-14 平安普惠企业管理有限公司 Online editing method, device and equipment based on HTML (Hypertext markup language) page and storage medium
CN110889270A (en) * 2018-08-16 2020-03-17 阿里巴巴集团控股有限公司 Form page document generation method and form page rendering method and device
CN111625219A (en) * 2020-05-22 2020-09-04 杭州指令集智能科技有限公司 BO component processing method, device and equipment
CN111832259A (en) * 2019-04-12 2020-10-27 中国联合网络通信集团有限公司 JSON data generation method and device
CN112434491A (en) * 2020-11-27 2021-03-02 杭州信雅达泛泰科技有限公司 HTML table parsing system and parsing method thereof for JSON

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102201009A (en) * 2011-06-21 2011-09-28 深圳市凯立德科技股份有限公司 Form generating method and device
CN102841791A (en) * 2012-07-12 2012-12-26 上海高洁信息科技股份有限公司 Method and system for generating online form
CN103455473A (en) * 2012-05-30 2013-12-18 刘继业 WEB form definition and application method based on hypertext markup language (HTML)
CN104216912A (en) * 2013-06-04 2014-12-17 广州中国科学院软件应用技术研究所 Method and device for achieving non-intrusive service form workflow
CN106775271A (en) * 2016-11-29 2017-05-31 中电科华云信息技术有限公司 The method that the transmission of system integration custom parameter is realized based on visualized operation list

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102201009A (en) * 2011-06-21 2011-09-28 深圳市凯立德科技股份有限公司 Form generating method and device
CN103455473A (en) * 2012-05-30 2013-12-18 刘继业 WEB form definition and application method based on hypertext markup language (HTML)
CN102841791A (en) * 2012-07-12 2012-12-26 上海高洁信息科技股份有限公司 Method and system for generating online form
CN104216912A (en) * 2013-06-04 2014-12-17 广州中国科学院软件应用技术研究所 Method and device for achieving non-intrusive service form workflow
CN106775271A (en) * 2016-11-29 2017-05-31 中电科华云信息技术有限公司 The method that the transmission of system integration custom parameter is realized based on visualized operation list

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110889270A (en) * 2018-08-16 2020-03-17 阿里巴巴集团控股有限公司 Form page document generation method and form page rendering method and device
CN110889270B (en) * 2018-08-16 2023-04-07 阿里巴巴集团控股有限公司 Form page document generation method, form page rendering method and device
CN109299448A (en) * 2018-09-12 2019-02-01 武汉轻工大学 Resume intelligence filling method, system, server and storage medium
CN109299448B (en) * 2018-09-12 2023-06-30 武汉轻工大学 Resume intelligent filling method, system, server and storage medium
CN111832259A (en) * 2019-04-12 2020-10-27 中国联合网络通信集团有限公司 JSON data generation method and device
CN111832259B (en) * 2019-04-12 2023-09-12 中国联合网络通信集团有限公司 JSON data generation method and device
CN110688600A (en) * 2019-09-09 2020-01-14 平安普惠企业管理有限公司 Online editing method, device and equipment based on HTML (Hypertext markup language) page and storage medium
CN111625219A (en) * 2020-05-22 2020-09-04 杭州指令集智能科技有限公司 BO component processing method, device and equipment
CN112434491A (en) * 2020-11-27 2021-03-02 杭州信雅达泛泰科技有限公司 HTML table parsing system and parsing method thereof for JSON

Also Published As

Publication number Publication date
CN107943465B (en) 2021-07-02

Similar Documents

Publication Publication Date Title
CN107943465A (en) A kind of method and device for generating HTML form
CN108415832B (en) Interface automation test method, device, equipment and storage medium
US10216554B2 (en) API notebook tool
US20200159950A1 (en) System and method for real-time collaboration
US11200033B2 (en) Application programming interface (API) based object oriented software development and textual analysis
EP3837620A1 (en) Systems, devices, and methods for facilitating website remediation and promoting assistive technologies
CN103049271A (en) Method and device for automatically generating description document of API (application program interface)
CN108388515A (en) Test data generating method, device, equipment and computer readable storage medium
JP2013528859A (en) Integration of client application and web page
US20170193375A1 (en) Rule guided fabrication of structured data and messages
US10521609B2 (en) Securely transferring data over a computer network
CN109522013A (en) A kind of code generating method and device of business function
CN116601644A (en) Providing interpretable machine learning model results using distributed ledgers
US20180096301A1 (en) Systems and methods for generating customized reports based on operational stage rules
WO2021013057A1 (en) Data management method and apparatus, and device and computer-readable storage medium
CN112084446A (en) Webpage editing method, editor, electronic equipment and readable storage medium
US11360763B2 (en) Learning-based automation machine learning code annotation in computational notebooks
US12008332B1 (en) Systems for controllable summarization of content
Yusop et al. Automated support to capture and validate security requirements for mobile apps
Weber et al. Basics in Business Informatics
US20230418859A1 (en) Unified data classification techniques
Florez et al. Automatic code generation system for transactional web applications
Fatima et al. Towards a sustainability-aware software architecture evaluation for cloud-based software services
CN112182552B (en) Real-name authentication method and device, electronic equipment and storage medium
US10776889B2 (en) Stakeholder equity valuation in collaborative projects

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
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20210702

CF01 Termination of patent right due to non-payment of annual fee