Study notes. JavaScript Basics (i)

Source: Internet
Author: User

    1. JavaScript is a programming language that you can use to add interactive properties to your Web pages.

<! DOCTYPE html>

The above code performs DOM operations through JavaScript and adds "Hello,cleveland" under node H1 when the page loads.

2. Can not do: 1) do not allow to write files on the server, 2) cannot close the window not opened by itself; 3) You cannot read information from an already open Web page from another server.

Each object in a 3.DOM tree is called a node of a tree, and you can use JavaScript to modify any aspect of the tree, including additions, deletions, modifications, and accesses. If the node contains an HTML tag, it is the element node, otherwise called the text node. ELEMENT nodes can contain text nodes.

4.JavaScript uses the event handler's command to handle the event. The usual event handlers are as follows:

Onabort loading of user-terminated pages

Onblur The user has left the object

onchange the user modified the object

The onclick user clicked on the object

The OnError script encountered an error

onfocus User activated the object

Object completes the load

onMouseOver the mouse pointer over the object

The mouse pointer leaves the object

Onselect user selects the content of the object

OnSubmit user submitted the form

OnUnload User leaves the page

5.HTML: Contains the content and structure of the page;

CSS: Control the appearance and performance of the page;

JavaScript: Controls the behavior of the page.

6.<div>, <span> is a range label, and the contents of each <div>, <span> should have similar meanings. <div>
is a block-level element that has a physical newline between the elements and the front and back;<span> is in line and can be applied to a sentence.

7.CSS # for ID,. For class.

This article is from the "Technology No Peak" blog, please be sure to keep this source http://shelia.blog.51cto.com/2930476/1621788

Study notes. JavaScript Basics (i)

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.