Detailed explanation of the process of writing JS

零下一度
Release: 2017-06-25 09:49:17
Original
2258 people have browsed it

html +css Static page

js Dynamic interaction

Principle: js is to modify the style, such as popping up a dialog box. The pop-up process is that the box is disabled Change it to display:enable. Or change the color when the mouse points to it. It is a tool to modify the style.

  • The process of writing JS
    • Layout: HTML+CSS

    • Event: Determine what actions users do (product design)

    • Write JS: In theevent, use JS to modify the style of the page element(Additional attributes: determine which attributes to modify )

  • What is an event

A complete event =

Scope: Action tag

Event statement: a user operation, for example: mouse in and out onmouseover, onmouseout,

Function action: a well-encapsulated action that can be understood as a more complex action.

The event statement is also a certain part of this scope An attribute, a function is a series of actions made by this attribute

  • function Standard location and encapsulation

Format:

Position:

id="div1" onmouseover="toGreen()" onmouseout="toRed()">


The above is the detailed content of Detailed explanation of the process of writing JS. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Previous article:There are three inheritance methods between javascript objects Next article:How does wireshark capture local data packets?
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
Latest Articles by Author
Latest Issues
Related Topics
More>
Popular Recommendations
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!