11-23 basic knowledge of Web base--javascript

Source: Internet
Author: User

First lesson about JavaScript

Definition: JavaScript is a scripting language, requires a host file, and its host file is an HTML file.

JavaScript is a lightweight programming language.

JavaScript is a programmatic code that can be inserted into an HTML page.

When JavaScript is inserted into an HTML page, it can be performed by all modern browsers.

The use: In the HTML position has three blocks: 1) inside head; 2) body inside; 3) after

1. Write HTML output

2. Responding to Events

3. Find elements, change content/Style

4. Defining variable groups-equivalent to structs in C # (a collection of variables)

The <script> code can be written in

5. How to invoke external JS

With "File"--new "JavaScript"--"create". Write operations, functions, and so on in the new "JavaScript" by calling them in HTML.

Format: <script src= "path. JS "></script>

Create a new file with the JS suffix on the outside.

Referencing external JS in the host file HTML

11-23 basic knowledge of Web base--javascript

Related Article

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.