Copy codeThe Code is as follows:
<Form onreturn = "ReturnCallBack ();" jstype = "vali">
</Form>
<Script type = "text/javascript">
Var ReturnCallBack = function (){
// CODE
Return true;
}
</Script>
The code looks too suspended. Why does it look like an onreturn event is added...
Let me talk about one reason for this. in the Framework, I did what I should do in the verification API, but there are some things that often need to change, such as verifying whether a checkbox can be selected, it is necessary to verify the situation based on different situations. These situations also change frequently and how the market needs to change. Therefore, I will return the jobs that check whether checkbox can select this type of change to the developers of the current project. I will only do what I should do.
For example, I will provide the form with an onreturn event, let others write the verification by themselves, and return true or false to me.
In the form of custom attributes, let others add and do some technical work. I used eval (). after verification is performed in the framework, I will execute the following sentence.
Copy codeThe Code is as follows:
// Verify the CODE...
Var ele = $ (this); // this is the form, which is developed by jquery.
Var result = eval (ele. attr ("onreturn "));
// CODE ..