[ES6]Day07 - constructor and prototype, inheritance
Getting started with ECMAScript 6 (Day07)
Continued: [ES6]Day06 - classes and objects in ES6
7.1.1 general
In the typical object-oriented language (java), there is the concept of class. Class is the template of object and object is the instance of class. But before ES6, js did not refer to the conce ...
Posted on Wed, 17 Jun 2020 21:44:52 -0400 by Axem
es6 new syntax
What is ES6
ECMAScript, the abbreviation of ECMAScript, is the standard of JavaScript language officially released in June 2015, officially named ECMAScript 2015 (ES2015). Its goal is to make JavaScript language can be used to write complex large-scale applications and become an enterprise development ...
Posted on Thu, 04 Jun 2020 09:04:56 -0400 by haaglin
Use JQuery to send a request to refresh the page locally
json
What is JSON
JSON(JavaScript Object Notation) is a lightweight data exchange format. It is based on ECMAScript A subset of. JSON uses a completely language independent text format, but also uses habits similar to the C language family (including C,C++,C#,Java,JavaScript,Perl,Python Etc.). These features make JSON an ideal data exchange l ...
Posted on Thu, 07 May 2020 11:34:17 -0400 by S_henry
The Vue awesome swiper component can't play automatically and the navigator doesn't display small dots
After more than an hour's tossing, it's strange. It used to be used like this. Why can't you think about it?
The problem is that when using the Vue awesome swiper component, it can't automatically rotate and the small dots of the navigator don't display
Made a mistake of course! Experience is not knowledge, knowledge is changing
...
Posted on Sat, 02 May 2020 10:39:16 -0400 by .Stealth
Note: new features of ES6 - abbreviation of function (arrow function)
The definition method of general function
var fn = function(...){
......
}
//For example:
var add = function(a,b){
return a+b;
}
//Or:
function fn(...){
......
}
//For example:
function add(a,b){
return a+b;
}
Shorthand of shorthand method
Delete the "function" keyword and functi ...
Posted on Wed, 15 Apr 2020 14:22:57 -0400 by Gokul
Note: new features of ES6 - parameter collection and array expansion
Parameter extension
Usually a function is defined, which can pass more parameters than parameters, but the extra parameters will be ignored.
function fn(a,b){
console.log(a);
console.log(b);
}
fn(1,2);//Output 1, 2 in sequence
fn(1,2,3,4);//Output 1, 2 in turn, and redundant parameters 3, 4 are ignored
To ...
Posted on Tue, 14 Apr 2020 13:11:02 -0400 by djdaz
jQuery -- the realization of shopping cart
Web front end review
HTML Tag/Element - Content tag hosts Content
CSS Display Box Model render page Display
Style sheets are inherited
But margin, padding, border, backgroundimage and backgroundColor are not inherited by child elements
javaScript - Behavior is responsible for Behavior
ECMAScript standard
BOM brows ...
Posted on Sat, 04 Apr 2020 05:26:12 -0400 by CNibbana
JavaScript variable declaration var,let.const
The scope of a var declaration variable is limited to the context of its declaration location
var x = 0; // x Is a global variable with a value of 0.
console.log(typeof z); // undefined,because z It doesn't exist yet.
function a() { // When a When called,
var y = 2; // y Declared as a function a The variable of the scope is then assign ...
Posted on Thu, 02 Apr 2020 23:29:48 -0400 by jogisarge
vue parent-child component data transfer method
Pass value from parent component to child component
It is easy for the parent component to pass values to the child component. When directly referencing the child component in the parent component, the data is bound in the child component and received in the props attribute of the child component.
The following is the ...
Posted on Tue, 31 Mar 2020 11:53:35 -0400 by Kenwio
Promise asynchronous programming solution
Why use promise?
Solve callback hell
fs.readFile(__dirname + '/data/a.txt', (err, data)=>{
if(!err){
console.log(data.toString());
fs.readFile(__dirname + '/data/b.txt', (err, data)=>{
if(!err){
console.log(data.toString());
}
...
Posted on Mon, 09 Mar 2020 03:14:06 -0400 by chowwiie