HTML Learning Notes (v)

Source: Internet
Author: User

1. JavaScript is a scripting language that provides user interaction, dynamic change of content, and data validation.

2. We use the script tag to embed JavaScript statements into an HTML document.

3. The script tag pair can be placed either in the head tag or in the body tag.

4. If we want to use JavaScript to play a window on the page, and write our own definition of the text, you can do this:

Alert ("Welcome to the Research and development department six!") ");

5. Variables are the amount of values that can vary; variable names must begin with a letter or underscore, a variable can contain numbers, letters, and JavaScript is case-sensitive.

6. We use the VAR keyword to declare the variable, var x, y, z = 10 equals var × = 10; var y = 10; var z = 10;

7. The data type of the variable is as follows:

8. The function in JavaScript is used to define the method, the name of the method is our own, but the method name must be followed by a pair of parentheses and a pair of curly braces. If we want to call this method in the body, we need to use the property onclick.

9. Document refers to the current HTML file, where the decimal point (.) is used to take its next level of control or domain value.

10. The branch judgment structure inside JavaScript is represented by the IF and else if statements,&& and,! = Represents not equal to, | | Indicate or.



HTML Learning Notes (v)

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.