JS Debug Statement

Source: Internet
Author: User

1 <!DOCTYPE HTML>2 <HTML>3     <Head>4         <MetaCharSet= "UTF-8">5         <title></title>6     </Head>7     <Body>8     </Body>9     <Scripttype= "Text/javascript">Ten     //function: a function block One     //Syntax: function name (argument list) {function Body} A     //function use is divided into two parts: 1, function definition 2, function invocation -     //1. No parameter function -         functionmyFunction () { the Alert ("I am a non-parametric function"); -         } - myFunction (); -  +  -      //2. Function with Parameters +         functionArgsfunction (A, b) { A             if(A>b) { at Alert ("a>b"); -             }Else{ - Alert ("a<b"); -             } -         } - Argsfunction (3,1); in  -  to      //3, the function form parameter does not fill the processing situation +     functionMyfunction2 () { -         var First=arguments[0]; the         varSecond=arguments[1]; * alert (first); $ alert (second);Panax Notoginseng }myfunction2 (3,Ten); -      the  +  A     //4. Functions that do not write function names (anonymous functions)---widely used the     function (){ + Alert ("1"); -     } $  $  -     //5, with the return value of the function, to find two numbers of the and, a function - A , within its function body can only have areturn the B, the statement after return no longer executes -     functionMyFunction3 (A, b) {Wuyi         varresult=a+b;  the         returnresult; - Alert ("how you doing?"); Wu     } -  About  $  -     //6, define a variable to accept the return value of the function -  -     functionMyFunction3 (A, b) { A         varresult=a+b;  +         returnresult; the     } -  $     varTemp=MyFunction3 (3, -); the alert (temp); the  the  the  -  in     //simplification of code the         functionMyFunction3 (A, b) { the     //var result = a + B;  About     //return result; the             returna+b; the         } the         //defines the return value of a variable-accept function +     //var temp = MyFunction3 (3,20); -     //alert (temp); the alert (MyFunction3 (3, -));Bayi      the  the          -     </Script> - </HTML>

JS Debug Statement

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.