07-node.js client-side rendering, server-side rendering and server-side rendering message board (without database, it is suitable for novices to get started. How does the node server render pages)

1, Client side rendering and server side rendering 1. Client side rendering (SSR) Html is only a static file. When the client requests, the server does not do any processing, and directly returns it to the client in the form of the original file. Then, according to the JavaScript on HTML, DOM is generated and html is inserted. 2. Servic ...

Posted by escocia1 on Fri, 04 Mar 2022 11:52:04 +0100

4-1 JS overview (birth of JavaScript, standard customization, ten defects)

1. How to count your own code lines Install: yarn global add cloc (cloc: count lines of code) Statistics: cloc --vcs=git (. Indicates the current directory of analysis) 2. Sir Lee invented HTML Mr Lai invented CSS Brandon invented JS 1, The birth of JavaScript 1. Brandon was ordered in the face of danger The company requires adding a script f ...

Posted by Vince on Fri, 04 Mar 2022 11:13:10 +0100

Give you three different ways to implement GET and POST requests

Article catalogue catalogue Article catalogue preface 1. Ajax in jQuery 1.1,$.get() 1.2,$.post()  1.3,$.ajax()  2. XMLHttpRequest mode 2.1. Initiate GET request 2.2. Initiate POST request 3,Axios 3.1. Initiate GET request 3.2. Initiate POST request summary preface It's a new beginning. After a happy holiday, I began to invest in th ...

Posted by waradmin on Fri, 04 Mar 2022 10:00:06 +0100

A tool library for recording, video recording and screen recording can be easily realized with JS

preface Hello, everyone. I'm a sea monster. Recently, the project encountered a demand for recording on the web page. After a wave of search, it was found react-media-recorder This library. Today, let's study the source code of this library, from 0 to 1 to realize the functions of recording, video recording and screen recording of React. ...

Posted by Byron on Fri, 04 Mar 2022 06:52:56 +0100

One article takes you to master the new features of Vue3, and you are no longer afraid of the interviewer~

preface Take notes and share some common Vue3 new features and which methods have changed. I only write some commonly used here. For more, please see the Vue3 official website here Interested parties can pay attention to the official account: front-end entertainment. Component v-model support parameters In vue2 When x, if we want to pass v ...

Posted by kettle_drum on Fri, 04 Mar 2022 02:41:08 +0100

Easy to use, Echars makes your data more colorful

Introduce JS You can get Apache EChartsTM in the following ways. From Download Interface of Apache ECharts official website Get the official source code package and build it. At ECharts GitHub Get. For details, see install nphart, save npecm“ Using ecarts in webpack" Pass jsDelivr Wait for CDN introduction Directly import the const ...

Posted by edraynham on Thu, 03 Mar 2022 23:05:19 +0100

Bootstrap actual combat - single page website

1, IntroductionSingle page has simple structure and clear layout. It is often used as the download introduction page of mobile App or a product. Now, the whole display web page tends to single page website design, so that the core information can be displayed at one time, which is more intuitive and simple for users and can quickly understand a ...

Posted by tunage on Thu, 03 Mar 2022 22:08:11 +0100

JavaScript changes this to point to - apply, call, bind

Formally speaking, these three methods can hijack the methods of another object and inherit the properties of another object. Generally speaking, it can change the direction of this. 1,apply 1. Basic use Syntax: apply(T,A) T: Change the direction of this A: Passed parameter, array type Specific demonstration: window.name = 'window' ...

Posted by heldenbrau on Thu, 03 Mar 2022 21:31:57 +0100

Tear Front End JavaScript by Hand (Phase 1)

1. Anti-shake function (debounce) Purpose: Prevent users from triggering events multiple times and wasting multiple requests Principle: Callback is executed after an event triggers for n seconds; If triggered again within n seconds, the time is recounted; const debounce = function(func,delay = 50){ /* func: Functions requiring ...

Posted by JayBlake on Thu, 03 Mar 2022 19:10:25 +0100

How to split an array into even blocks using JavaScript

Author: Abhilash Kakumanu Translator: Front-end wit Source: stackabuse Have a dream, have dry goods, WeChat Search [Move the World] pays attention to this bowl-brushing wit that was still cleaning in the morning. This article GitHub https://github.com/qq449245884/xiaozhi Included, there are complete test points, materials and my series ...

Posted by hasjem on Thu, 03 Mar 2022 18:32:42 +0100