Home > Web Front-end > JS Tutorial > Some summary of Javascript for beginners_Basic knowledge

Some summary of Javascript for beginners_Basic knowledge

WBOY
Release: 2016-05-16 18:59:09
Original
914 people have browsed it

Gains and summary of learning js today:

When is the script executed:

1. Execute the script when the page is opened

When the browser opens an HTML document, it The entire document is explained from scratch, including HTML tags and scripts. If there are statements in the script that can be executed directly, they will be interpreted and executed immediately when encountered. For example:



2. Use the ONLOAD event to execute the script

The onload event occurs when a page is opened in the browser. This method is often used when opening a page. At the same time, some messages are displayed to the user.



I am very happy that China won 16 gold medals



3. Execute the script through user events
For example, moving the mouse, clicking on a link, and other actions generate corresponding events. onlick="alert("This is wrong")"
Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template