
技术领域technical field
本发明涉及浏览器中生成表单领域,尤其涉及一种基于JavaScript实现浏览器中点击组件生成表单的方法。The invention relates to the field of form generation in browsers, in particular to a method for generating forms based on JavaScript based on click components in browsers.
背景技术Background technique
目前市场上在浏览器上点击组件生成表单的方法,一般需要下载软件,在软件上操作后,软件生成网页版表单;或者有浏览器可生成表单,但前提需要下载扩展程序,过程繁琐,给用户的使用带来不便。At present, the method of generating a form by clicking a component on the browser generally requires downloading software. After operating on the software, the software generates a web version form; It is inconvenient for users to use.
因此,结合上述存在的技术问题,有必要提供一种新的技术方案。Therefore, combined with the above-mentioned technical problems, it is necessary to provide a new technical solution.
发明内容SUMMARY OF THE INVENTION
为解决现有技术中存在的技术问题,本发明提供了一种基于JavaScript实现浏览器中点击组件生成表单的方法,具体技术方案如下所述:In order to solve the technical problems existing in the prior art, the present invention provides a method for generating a form based on JavaScript by clicking a component in a browser. The specific technical solution is as follows:
基于JavaScript实现浏览器中点击组件生成表单的方法,包括如下步骤:A method for generating a form by clicking a component in a browser based on JavaScript includes the following steps:
S1:用户点击浏览器中的表单组件;S1: The user clicks the form component in the browser;
S2:服务器判断点击的表单组件类型,同时服务器生成相应的表单数据;S2: The server determines the type of the clicked form component, and the server generates the corresponding form data;
S3:浏览器对所述表单数据进行验证,验证通过后发送并存储于服务器;S3: The browser verifies the form data, and after the verification is passed, it is sent and stored in the server;
S4:用户在浏览器页面点击填写;S4: The user clicks on the browser page to fill in;
S5:浏览器将填写请求发送给服务器,服务器接口拉取所述表单数据;S5: The browser sends the filling request to the server, and the server interface pulls the form data;
S6:浏览器将所述表单数据渲染成可填写的form表单。S6: The browser renders the form data into a fillable form.
进一步的,对于步骤S3,若浏览器对所述表单数据验证不通过,返回重新执行步骤S2。Further, for step S3, if the browser fails to verify the form data, it returns to execute step S2 again.
优选的,所述表单数据包含问题标识、问题类型、问题说明、问题描述,答案标识、答案类型、答案说明和答案序号。Preferably, the form data includes question identification, question type, question description, question description, answer identification, answer type, answer description and answer serial number.
优选的,步骤S1中,服务器将若干表单组件配置成表单模板发送并显示于浏览器中,用户点击浏览器中的表单模板。Preferably, in step S1, the server configures several form components as form templates to send and display in the browser, and the user clicks the form template in the browser.
优选的,用户点击浏览器中的表单模板后,依次执行步骤S4、S5和S6。Preferably, after the user clicks on the form template in the browser, steps S4, S5 and S6 are performed in sequence.
进一步的,所述表单模板为疫情填报、体温上报、日报周报或审批流程。Further, the form template is an epidemic situation report, a temperature report, a daily weekly report or an approval process.
本发明的基于JavaScript实现浏览器中点击组件生成表单的方法,具有如下有益效果:The method for generating a form by clicking a component in a browser based on the JavaScript implementation of the present invention has the following beneficial effects:
(1)本发明的基于JavaScript实现浏览器中点击组件生成表单的方法,通过点击浏览器中对应的组件,生成不同类型的表单数据自动保存到服务器,最后渲染成可填写的form表单,可提高表单生成和填报的效率;(1) The method for generating forms by clicking on components in a browser based on JavaScript of the present invention, by clicking on corresponding components in the browser, generates different types of form data and automatically saves them to the server, and finally renders them into fillable forms, which can improve the The efficiency of form generation and filling;
(2)本发明的基于JavaScript实现浏览器中点击组件生成表单的方法,其用户使用方便快捷。(2) The method for generating a form by clicking a component in a browser based on JavaScript of the present invention is convenient and quick for users to use.
本发明的附加方面和优点将在下面的描述中部分给出,部分将从下面的描述中变得明显,或通过本发明的实践了解到。Additional aspects and advantages of the present invention will be set forth, in part, from the following description, and in part will be apparent from the following description, or may be learned by practice of the invention.
附图说明Description of drawings
为了更清楚地说明本发明的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其它附图。In order to illustrate the technical solutions of the present invention more clearly, the following briefly introduces the accompanying drawings required in the description of the embodiments or the prior art. Obviously, the accompanying drawings in the following description are only some embodiments of the present invention. , for those of ordinary skill in the art, other drawings can also be obtained based on these drawings without any creative effort.
图1是本发明所述的基于JavaScript实现浏览器中点击组件生成表单方法的流程图;Fig. 1 is the flow chart of the method for generating forms by clicking on components in the browser based on JavaScript realization of the present invention;
具体实施方式Detailed ways
下面将详细描述本发明实施例,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。The embodiments of the present invention will be described in detail below, and the technical solutions in the embodiments of the present invention will be described clearly and completely. Obviously, the described embodiments are only a part of the embodiments of the present invention, but not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present invention.
实施例Example
本发明涉及一种基于JavaScript实现浏览器中点击组件生成表单的方法,所述方法具体为:The present invention relates to a method for realizing click component generation in a browser based on JavaScript, and the method is specifically:
S1:用户点击浏览器中的表单组件;S1: The user clicks the form component in the browser;
S2:服务器判断点击的表单组件类型,同时服务器生成相应的表单数据;S2: The server determines the type of the clicked form component, and the server generates the corresponding form data;
S3:浏览器对所述表单数据进行验证,验证通过后发送并存储于服务器;S3: The browser verifies the form data, and after the verification is passed, it is sent and stored in the server;
S4:用户在浏览器页面点击填写;S4: The user clicks on the browser page to fill in;
S5:浏览器将填写请求发送给服务器,服务器接口拉取所述表单数据;S5: The browser sends the filling request to the server, and the server interface pulls the form data;
S6:浏览器将所述表单数据渲染成可填写的form表单。S6: The browser renders the form data into a fillable form.
优选的,所述表单数据包含问题标识、问题类型、问题说明、问题描述,答案标识、答案类型、答案说明和答案序号。Preferably, the form data includes question identification, question type, question description, question description, answer identification, answer type, answer description and answer serial number.
在另一个实施例中,对于步骤S3,若浏览器对所述表单数据验证不通过,返回重新执行步骤S2。In another embodiment, for step S3, if the browser fails to verify the form data, it returns to perform step S2 again.
在又一个实施例中,服务器将若干表单组件配置成表单模板发送并显示于浏览器中,用户点击浏览器中的表单模板。具体步骤如下:In yet another embodiment, the server configures several form components to be sent as a form template and displayed in the browser, and the user clicks the form template in the browser. Specific steps are as follows:
S21:用户点击浏览器中的表单模板;S21: The user clicks the form template in the browser;
S22:用户在浏览器页面点击填写;S22: The user clicks on the browser page to fill in;
S23:浏览器将填写请求发送给服务器,服务器接口拉取所述表单数据;S23: The browser sends the filling request to the server, and the server interface pulls the form data;
S24:浏览器将所述表单数据渲染成可填写的form表单。S24: The browser renders the form data into a fillable form.
优选的,所述表单模板为疫情填报、体温上报、日报周报或审批流程。Preferably, the form template is an epidemic situation report, a temperature report, a daily weekly report or an approval process.
针对上述实施例的部分实现代码,示例如下:For the partial implementation code of the above-mentioned embodiment, the example is as follows:
本发明的有益效果是:The beneficial effects of the present invention are:
(1)本发明的基于JavaScript实现浏览器中点击组件生成表单的方法,通过点击浏览器中对应的组件,生成不同类型的表单数据自动保存到服务器,最后渲染成可填写的form表单,可提高表单生成和填报的效率;(1) The method for generating forms by clicking on components in a browser based on JavaScript of the present invention, by clicking on corresponding components in the browser, generates different types of form data and automatically saves them to the server, and finally renders them into fillable forms, which can improve the The efficiency of form generation and filling;
(2)本发明的基于JavaScript实现浏览器中点击组件生成表单的方法,其用户使用方便快捷。(2) The method for generating a form by clicking a component in a browser based on JavaScript of the present invention is convenient and quick for users to use.
尽管上面已经示出和描述了本发明的实施例,可以理解的是,上述实施例是示例性的,不能理解为对本发明的限制,本领域的普通技术人员在本发明的范围内可以对上述实施例进行变化、修改和变型。Although the embodiments of the present invention have been shown and described above, it should be understood that the above-mentioned embodiments are exemplary and should not be construed as limiting the present invention. Embodiments are subject to variations, modifications and variations.
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202011259519.3ACN114492337A (en) | 2020-11-12 | 2020-11-12 | Method for generating form by clicking component in browser based on JavaScript |
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202011259519.3ACN114492337A (en) | 2020-11-12 | 2020-11-12 | Method for generating form by clicking component in browser based on JavaScript |
| Publication Number | Publication Date |
|---|---|
| CN114492337Atrue CN114492337A (en) | 2022-05-13 |
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN202011259519.3AWithdrawnCN114492337A (en) | 2020-11-12 | 2020-11-12 | Method for generating form by clicking component in browser based on JavaScript |
| Country | Link |
|---|---|
| CN (1) | CN114492337A (en) |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN105760440A (en)* | 2016-02-02 | 2016-07-13 | 广州市科南软件有限公司 | Achievement method and system of online form designer |
| CN105808701A (en)* | 2015-11-23 | 2016-07-27 | 江苏中威科技软件系统有限公司 | Method and system for realizing automated form verification and communication between multiple systems |
| CN110472207A (en)* | 2018-05-10 | 2019-11-19 | 北京京东尚科信息技术有限公司 | List generation method and device |
| CN111563226A (en)* | 2020-07-14 | 2020-08-21 | 嘉兴太美医疗科技有限公司 | User-defined layout online form page data storage method and device |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN105808701A (en)* | 2015-11-23 | 2016-07-27 | 江苏中威科技软件系统有限公司 | Method and system for realizing automated form verification and communication between multiple systems |
| CN105760440A (en)* | 2016-02-02 | 2016-07-13 | 广州市科南软件有限公司 | Achievement method and system of online form designer |
| CN110472207A (en)* | 2018-05-10 | 2019-11-19 | 北京京东尚科信息技术有限公司 | List generation method and device |
| CN111563226A (en)* | 2020-07-14 | 2020-08-21 | 嘉兴太美医疗科技有限公司 | User-defined layout online form page data storage method and device |
| Publication | Publication Date | Title |
|---|---|---|
| EP2013575B1 (en) | Communication device for emulating a behavior of a navigation device | |
| CN105357323B (en) | A kind of HTML5 page debugging method and device in APP | |
| CN105872102B (en) | A kind of File Upload and Download method | |
| CN111679826B (en) | Method, device, equipment and storage medium for previewing webpage editing content in real time | |
| CN101576843A (en) | Method and device for testing application program interface | |
| WO2011127758A1 (en) | Method for manufacturing webpage, system, client and server thereof | |
| EP2577549A1 (en) | System and method for continuation of a web session | |
| CN108243154B (en) | verification code data processing method and device | |
| US9971636B2 (en) | Methods for implementing web services and devices thereof | |
| CN102932469B (en) | Method for achieving client browser and client browser | |
| CN110858839A (en) | OAUTH2SAML token service | |
| CN103327051A (en) | Long-distance desktop management system and method | |
| CN103888408A (en) | Method for uploading data to social networking platform and device thereof | |
| EP1696339A2 (en) | System and method for testing data format using targeted variant input | |
| CN114532597A (en) | Atomization output method based on sine wave and related equipment thereof | |
| CN102929489B (en) | Client browser implementation method and client browser | |
| CN115175183B (en) | 5G message-based authentication method and authentication device | |
| CN115643054A (en) | Identity information verification method, device, server, medium and product | |
| CN114492337A (en) | Method for generating form by clicking component in browser based on JavaScript | |
| CN109756465A (en) | Method and device for authentication | |
| WO2007050345A2 (en) | Method and system for testing enterprise applications | |
| CN115408288A (en) | An automatic clicking method and system based on coordinates and automated testing framework | |
| CN114239518A (en) | System and method for online generation of electronic contract template | |
| US9052906B2 (en) | Modularized customization of a model in a model driven development environment | |
| CN103838596A (en) | Formatted file generation system, device and method for data processing |
| 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 | ||
| WW01 | Invention patent application withdrawn after publication | ||
| WW01 | Invention patent application withdrawn after publication | Application publication date:20220513 |