Learning to operate DOM

Learning to operate DOM DOM (Document Object Model) is a set of technical specifications formulated by W3C. It is a Web standard used to describe how JavaScript scripts interact with HTML or XML documents. DOM stipulates that the whole document is a document node, each element is an element node, the text contained in the element is a text no ...

Added by sasa on Sat, 09 Oct 2021 16:18:37 +0300

Hand in hand to teach you to send a bag

catalogue Introduction to package First, let's briefly understand why packages are needed: Package classification: Package specification (basic): Package building steps:   Preliminary preparation:   Release package: Delete package: expand: Introduction to package First, let's briefly understand why packages are needed: Be ...

Added by harchew on Thu, 07 Oct 2021 21:04:53 +0300

Easily own your own bag

What is a package? Third-party modules in Node.js are also called packages Why do I need a bag? Because the built-in modules of Node.js provide only a few underlying API s, project development based on built-in modules is inefficient Packages are encapsulated based on built-in modules, providing a more advanced and convenient API, greatly ...

Added by tekrscom on Thu, 07 Oct 2021 19:53:01 +0300

Use React official Hooks instead of redux complete solution

redux as we all know, it is the react Management Library of the third party. It is difficult for many people to make complaints about it and has to use it. I recently found that most of the functions of redux can be implemented only with react official hooks! It is easier to use than redux, and the amount of code is less. I wrote a complete dem ...

Added by [PQ3]RogeR on Thu, 07 Oct 2021 03:00:37 +0300

Calculated properties and listeners in Vue

1, v-for 1. Update monitoring In general, changes in data will lead to v-for update, but in some cases, such as array method filter, it will return a new array, or directly change the value of the array in a literal way, which will not lead to v-for update. In such cases, reassignment or this.$set() or Vue.set() methods can be used // v-for ...

Added by wazza on Wed, 06 Oct 2021 01:22:38 +0300

One line command to update all npm dependent packages

npm packages are updated very quickly in order to update projects or global dependencies to the latest version. The traditional method is to update one by one, such as updating react to the latest version. The command is as follows: # npm npm i --save react@latest # yarn yarn add react@latest Copy code yarn is a new generation of js package ...

Added by Lerris on Mon, 27 Sep 2021 03:53:37 +0300

Front end interview questions

JS What are basic data types in JS? What is a reference data type? difference? Basic data types (stored on the stack): number, string, Boolean, undefined, null Symbol(es6 new) Reference data type (stored in the heap and reference address of data stored in the stack): object, array, function, date, RegExp How many ways to judge the data ty ...

Added by timski72 on Sun, 26 Sep 2021 11:41:43 +0300

Operation and maintenance monitoring series (15) - Alertmanager adds 163 mailbox, nail and wechat alarm notification functions

Mailbox 163 The alarm notification can be sent by mail. Then, in the previous document, we configured the sending email alarm method. 1. Set 163 mailbox To send mail, you need an smtp mail server. First, you need to set Netease mailbox. First log in to mailbox 163 and enter the mailbox center settings. Then start POP3/SMTP service, where yo ...

Added by help_needed on Fri, 24 Sep 2021 14:52:46 +0300

ES6 new syntax

(1) let and const 1.let let defines a variable. A variable cannot be defined again, but its value can be changed Code: let name = 'zhangsan'; name = 'lisi'; console.log(name); // lisi let name = 'wangwu'; // Define again, and an error is reported: Identifier 'name' has already been declared Has block level scope. (i.e. braces) Code: ...

Added by GregL83 on Thu, 23 Sep 2021 04:59:35 +0300

nodejs -- browser event ring - macro task and micro task

1.JS is single threaded    The code in JS is serial,   The previous execution is not completed, and the later cannot be executed 2. Execution sequence The program will execute all synchronization codes from top to bottomIf asynchronous code is encountered during execution, the asynchronous code will be placed in the event ...

Added by az_wraith on Wed, 22 Sep 2021 09:13:28 +0300