Unlock instant, AI-driven research and patent intelligence for your innovation.

Method for calibrating form

A verification method and form verification technology, applied in the field of form verification, can solve problems such as code changes and achieve the effect of reducing verification codes

Active Publication Date: 2013-12-11
重庆云流未来科技有限公司
View PDF2 Cites 12 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

Moreover, when the plug-in function cannot meet the needs, whether it is modifying the plug-in itself or switching to other plug-ins, it will bring about very large code changes

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Method for calibrating form
  • Method for calibrating form
  • Method for calibrating form

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0029] Embodiments of the present invention will be described in detail below in conjunction with the accompanying drawings.

[0030] refer to figure 1 , the form verification method of the embodiment of the present invention may include the following steps:

[0031] Step 101, when the document structure loading completion (DOM Ready) event of the page is detected, all forms in the page are obtained, and when the newly added form creation completion (creationComplete) event is detected in the page, the newly added form in the page is obtained ;

[0032] Step 102, for the obtained form, if the form has an onsubmit attribute set, store the onsubmit attribute in a variable, create an anonymous function, set the anonymous function to the onsubmit attribute of the form, and make the onsubmit attribute of the form When triggered, execute the method defined by the anonymous function;

[0033] Wherein, the method defined by the anonymous function is:

[0034] Validate the form;

...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

PUM

No PUM Login to View More

Abstract

The invention provides a method for calibrating a form, and belongs to the field of internet application. The method comprises the step of acquiring all forms in a page table when a file structure loading finishing event of the page table is detected and acquiring a form newly added to the page table when a newly added form establishing finishing event of the page table is detected, and the step of storing an onsubmit attribute to a variable and establishing a new anonymous function if the onsubmit attribute is set for the newly acquired form, and the step of setting the anonymous function as the onsubmit attribute of the form so as to execute the method defined by the anonymous function when the onsubmit attribute of the form is triggered. The method for calibrating the form can reduce calibration codes for the single form or single widget.

Description

technical field [0001] The invention relates to the field of Internet applications, in particular to a form verification method. Background technique [0002] In web development, form validation has always been a very tedious task. Whether you develop the verification function yourself or use an open source verification plug-in, you need to write a dedicated verification code for a single control or form in the program. In a system that uses forms extensively, developers need to spend a lot of time and energy writing and maintaining these verification codes, which is not conducive to improving the quality of project coding. [0003] When performing form validation processing, you can choose to use third-party form validation plug-ins, but most plug-ins need to use their proprietary methods to configure the function of the validator through javascript code (including error handling and display methods) , and a method to submit the form, etc.). If the function of the plug-i...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

Application Information

Patent Timeline
no application Login to View More
Patent Type & Authority Applications(China)
IPC IPC(8): G06F11/36
Inventor 吴尚智
Owner 重庆云流未来科技有限公司