Coding With Fun
Home Docker Django Node.js Articles Python pip guide FAQ Policy

How about learning javascript?


May 28, 2021 Article blog


Table of contents


JavaScript is an object- and event-driven scripting language with secure performance, and there are many benefits to learning about it.

JavaScript is used in web application development to add a variety of dynamic features to our web pages, allowing users to navigate to smooth and beautiful effects. JavaScript scripts are often embedded in HTML to do this.

JavaScript features

  1. is an explanatory scripting language, and the code does not need to be precompiled
  2. Add interactive behavior to HTML pages
  3. The ability to embed HTML pages for separation structures and behaviors that are beneficial to individual JS files
  4. Across platforms, the vast majority of browsers support its operation

JavaScript composition

 How about learning javascript?1

JavaScript uses

  1. Dynamic text is embedded in HTML pages
  2. HTML elements read and write
  3. Browser events can respond
  4. Detect guest browser records
  5. Control cookies, such as creating modifications
  6. The data is validated before it is submitted to the server
  7. Server-side programming based on Node .js technology

JavaScript basic structure

<script type="text/javascript">
    <!—
          JavaScript 语句;
    —>
</script >

instance:

……
<title>初学JavaScript | w3cschool(编程狮)</title>
</head>
<body>
<script type="text/javascript">
    document.write("初学JavaScript");
    document.write("<h1>Hello,JavaScript</h1>");
</script>
</body>
</html>

<script>... <script > can contain documents anywhere, as long as the code is read and loaded into memory before it is used

JavaScript execution principle

 How about learning javascript?2

The way JavaScript is referenced

1, the use of <script > label

2, external JS file

<script src="export.js"  type="text/javascript"></script>

3, HTML tags

<input name="btn" type="button" value="弹出消息框"   
   onclick="javascript:alert('欢迎你');"/>

JavaScript core syntax

 How about learning javascript?3

That's all you need to learn how javascript works.