JavaScript Chinese Reference Manual

Read(88476) update time(2022-04-15)

"JavaScript Chinese Reference Manual" is the official JS online development manual. This JavaScript online learning manual contains the introduction and usage examples of each JS object, property, and method. It is an indispensable online query manual for WEB programming learning and developers!


JavaScript is a literal scripting language. It is a dynamically typed, weakly typed, prototype-based language with built-in support for types.

Its interpreter is called the JavaScript engine, which is part of the browser and is widely used in client-side scripting languages. It was first used on HTML (an application under the Standard Universal Markup Language) web page. Add dynamic functions to HTML web pages.

Tips: It is recommended to learn HTML CSS before learning js, because the basic operation of javascript is to operate html tags and css properties.

JavaScript components

  • ECMAScript, describes the syntax and basic objects of the language.

  • Document Object Model (DOM) describes the methods and interfaces for processing web content.

  • Browser Object Model (BOM) describes the methods and interfaces for interacting with the browser.

First javascript

Instance

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>php中文网(php.cn)</title>
</head>
<body>
	
<p>
JavaScript 能够直接写入 HTML 输出流中:
</p>
<script>
document.write("<h1>这是一个标题</h1>");
document.write("<p>这是一个段落。</p>");
</script>
<p>
您只能在 HTML 输出流中使用 <strong>document.write</strong>。
如果您在文档已加载后使用它(比如在函数中),会覆盖整个文档。
</p>
	
</body>
</html>

Running instance»

Click the "Run Instance" button to view the online instance

JavaScript is very easy to learn! It has been widely used in web application development and is often used to add various dynamic functions to web pages to provide users with smoother and more beautiful browsing effects. Usually JavaScript scripts realize their functions by embedding them in HTML.

Tips: Our JavaScript tutorials will help you learn JavaScript from beginner to advanced. If you have any questions, please go to the PHP Chinese website JavaScript Community to ask your question, and enthusiastic netizens will answer it for you.

What javascript can do

  1. Embed dynamic text into HTML pages.

  2. Respond to browser events.

  3. Read and write HTML elements.

  4. Validate data before it is submitted to the server.

  5. Detect the visitor’s browser information.

  6. Control cookies, including creation and modification.

  7. Server-side programming based on Node.js technology.

JavaScript features

  • Scripting language. JavaScript is an interpreted scripting language. Languages ​​such as C and C are compiled first and then executed, while JavaScript is interpreted line by line during the running of the program.

  • Object based. JavaScript is an object-based scripting language that can not only create objects but also use existing objects.

  • Simple. The JavaScript language uses weakly typed variable types and does not impose strict requirements on the data types used. It is a scripting language based on Java's basic statements and controls, and its design is simple and compact.

  • Dynamic. JavaScript is an event-driven scripting language that can respond to user input without going through a Web server. When visiting a web page, JavaScript can directly respond to these events when the mouse is clicked, moved up or down, or moved in the window.

  • Cross-platform. JavaScript scripting language does not depend on the operating system and only requires browser support. Therefore, after writing a JavaScript script, it can be brought to any machine for use, provided that the browser on the machine supports the JavaScript scripting language. Currently, JavaScript is supported by most browsers.

What this JavaScript tutorial manual covers

This JavaScript tutorial covers all javascript basics and advanced knowledge, including examples of all javascript objects, properties, and methods, as well as JavaScript Knowledge of how to work with HTML and CSS and more.

Tips: Each chapter of this tutorial contains many javascript examples. You can directly click the "Run Example" button to view the results online. These examples will help you better understand and use JavaScript.

Other JavaScript-related learning reference resources

In addition to the knowledge expansion on the right side of this page, the following resources are also selected for everyone

  1. JavaScript Quick Start_Jade Girl Heart Sutra Series

  2. ##Dugu Jiujian (3)_JavaScript Video Tutorial

  3. Front-end learning route: How to become an excellent front-end developer!