ES6 --- structural assignment of variables
1, Deconstruction assignment of array
ES6 allows you to extract values from arrays and objects according to a certain pattern and assign values to variables, which is called structure. Previously, assigning values to variables can only be assigned directly; let a =1;let b =2;let c=3; In ES6, it can be written as:
let [a,b,c] = [1,2,3];
You c ...
Added by caedo on Thu, 10 Mar 2022 14:06:30 +0200
ES6 basic introduction
1, First acquaintance with ES6
es6 compatibility view
1. let and const
let, like var, is used to declare variables whose values can be changedconst is used to declare constants. Once a constant is initialized, it cannot be re assignedconst must be initialized when declared
let name = 'toot toot'
let age = 18
const sex = 'female' ...
Added by toledojimenez on Wed, 09 Mar 2022 10:00:51 +0200
JavaWeb_12_ Master Ajax in an hour
Master Ajax in an hour
Click jump for one hour to master Ajax video
Life, one stop has one stop of scenery, one year has one year of taste, your age should be the medal of your life, not the reason for your sadness.
What is AJAX?
AJAX = Asynchronous JavaScript and XML.
AJAX is a technology that can update some web pages without ...
Added by chillininvt on Wed, 09 Mar 2022 09:21:03 +0200
Interpretation of Vue source code (12) -- patch
When learning becomes a habit, knowledge becomes common sense. Thank you for your attention, likes, collections and comments.The new video and articles will be sent to WeChat official account for the first time. Li YongningThe article has been included in github warehouse liyongning/blog , welcome to Watch and Star.prefaceAs mentioned earlier, ...
Added by Axelbrook on Wed, 09 Mar 2022 05:47:10 +0200
ES6 new method
character string
includes()
console.log('abc'.includes('a'));//true
console.log('abc'.includes('ab'));//true
console.log('abc'.includes('ac'));//false
The second parameter - start search location, which is 0 by default
console.log('abc'.includes('a', 0));//true
console.log('abc'.includes('a', 1));//false
Application - URL add parameters ...
Added by Blesbok on Mon, 07 Mar 2022 09:49:32 +0200
Use of axios in vue
1, What is Axios
Axios is a promise based HTTP Library (similar to jQuery's Ajax for HTTP requests)Can be used for browsers and node JS (it can be used for both the client and the server written by node.js)
2, What are the features of Axios
Support promise APIIntercept requests and responsesConvert request data and response dataCance ...
Added by marc2000 on Mon, 07 Mar 2022 02:43:07 +0200
JavaScript form validation
Preface: the form verification we talked about this time uses the contents of the previous articles, which is more difficult than the previous ones. I will explain it in detail in the form of comments in the code.
catalogue
I Simple form validation
Verification method 1:
Verification method 2:
II Regular verification
I Regular rules
Cont ...
Added by gameshints on Sun, 06 Mar 2022 17:13:17 +0200
Detailed explanation of JavaScript event flow
DOM event flow
To understand the event flow, we must first understand three points:
Elements are not independent, they are connected in seriesAfter a single element triggers an event, it will affect other elementsMode of event flow: event capture (proposed by Netscape) and event bubbling (proposed by IE)
Let's take the above figure as ...
Added by pbjpb on Sun, 06 Mar 2022 13:48:01 +0200
Thoroughly understand the three inheritance of prototype chain and Class inheritance of ES6
Prototype inheritance
Advantages: the same prototype object
Disadvantages: the prototype object cannot be modified, which will affect all instances
function Animal(){
this.type = "animal"
};
function Cat(name,color){
this.name = name;
this.color = color;
};
Cat.prototype = new Animal ...
Added by dw89 on Sat, 05 Mar 2022 01:57:58 +0200
10 database and identity authentication
10. Database and identity authentication
1. Steps to operate the database in the project
Install the third-party module (MySQL) that operates the MySQL databaseConnect to MYSQL database through MYSQL moduleExecute SQL statements through mysql module
2. The code realizes the connection to the database
//1. Import mysql module
//import mysql ...
Added by Branden Wagner on Thu, 03 Mar 2022 05:29:00 +0200