In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/03 Report--
This article mainly shows you the "sample analysis of the return false return value problem", the content is simple and clear, and I hope it can help you solve your doubts. Let the editor lead you to study and study the "sample analysis of the return false return value problem".
The problem of return value of returnfalse
Once the return in the function has a return value, instead of executing the following statement, skip to the place where the function is called. The following PHP function code, the first if condition meets, then the function value returns Boolean false, you can return the value of a function, and jump out of the function; as soon as the resume statement is encountered, the program stops execution on that line of code, and the execution control will immediately return to the code where the program is called.
Functionchkinput (form)
{
If (form.title.value== "")
{
Alert ("Please enter the article title!")
Form.title.select ()
Returnfalse;// Note cannot be written as return (false); 2009.12.15
}
If (form.content.value== "")
{
Alert ("the article body cannot be empty @!")
Form.content.select ()
Returnfalse
}
Returntrue
}
Returnfalse trigger problem
When is the onsubmit event triggered? The onsubmit event occurs when the confirm button in the form is clicked. The reasons for not triggering are as follows:
The A.onsubmit attribute is triggered when form commits with a button such as input:submit, otherwise it will not be triggered. If you are using a normal input:button, specify a javascript function in the onclick property, and then execute the submit () function of form instead of the onsubmit attribute in this function.
b. Take a look at a piece of code first:
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.