HTML Study Notes (5): html Study Notes

Source: Internet
Author: User

HTML Study Notes (5): html Study Notes

1. Javascript is a scripting language that provides user interaction, dynamic content modification, and data verification.

2. We use the script tag to embed javascript statements into html documents.

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

4. If you want to use javascript to pop up a window on the webpage and write your own defined text on it, you can do this:

Alert ("Welcome to R & D department 6! ");

5. A variable is a variable that can change the value. The variable name must start with a letter or underline. The variable can contain numbers and letters. javascript is case sensitive.

6. We use the var keyword to declare variables. var x, y, z = 10 is equivalent to var x = 10; var y = 10; var z = 10;

7. The data types of variables are as follows:

8. Functions in Javascript are used to define methods. The method names are obtained by ourselves, but the method names must be followed by a pair of parentheses and a pair of braces. If we want to call this method in the body, we need to use the onClick attribute.

9. document refers to the current html file. the decimal point (.) is used to obtain its lower-level control or Domain value.

10. The Branch judgment structure in Javascript uses the if and else if statements, & and ,! = Indicates not equal to, | indicates or.



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.