JavaScript Basics Learn Notes _ basics

Source: Internet
Author: User

Introduction to 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 programming code that can be inserted into an HTML page.

JavaScript is inserted into an HTML page and can be executed by all modern browsers.

Second, use :

There are three blocks in the HTML position:
1) head inside;
2) body inside;
3 after

1. Write HTML output

2. Responding to Events

3, find the elements, change the content/style

4. Define variable groups--equivalent to a struct in C # (a set of variables)

<script> code can be written in

5, how to call the external JS

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

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

Create a new file with JS suffix on the outside.

Referencing external JS in host file html

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.