The following error occurs in the Java file: Cannot return from outside a function or method ?, Outsidemethod
1. Open> Myeclipse or Eclipse. (Myeclipse is used)
2. Open> Window> Preferences 1:
Figure 1
3. Open> Preferences> MyEclipse> Validation> JavaScript validator for JS files (remove "√" in Bulid) 2:
Figure 2
4. Apply> OK!
* 5. Another method: Right-click the project> MyEclipse> Exclude From Validation ("√ ")
Cannot return from outside a function or method appears in the Java Project
This "return checkSubmit ()" means to check when you click "OK" to submit. If checkSubmit () returns true, the system submits the request and returns false without submitting the request, 404 the path you submitted may be incorrect.
[Development based on SSH framework] What is the error of Cannot return from outside a function or method?
The Myeclipse compiler does not support js. You write and imaging your code like return.
<Input type = "submit" value = "log" onclick = "checkForm ();"/>
In this way, no error will be reported, and then judgment will be made in the checkForm (). If it does not meet the conditions, return directly. If it meets the conditions added, it will jump to the background for execution. I have been doing this all the time.