JavaScript advanced programming DOM extension

Article directory 11 DOM extension 11.1 selector API 11.1.1 querySelector() method 11.1.2 querySelector() method 11.1.3 matchsselector() method 11.2 element traversal 13.3 HTML5 11.3.1 class related extensions 11.3.2 focus management 11.3.3 HTML document changes 11.3.4 character set properties 11 ...

Posted on Fri, 17 Jan 2020 07:28:01 -0500 by Atanu

A detailed explanation of the multithreading concurrent tool class CyclicBarrier

Article directory brief introduction Example Realization principle Summary brief introduction In the literal sense, CyclicBarrier means loopback barrier, which allows a group of threads to reach a state and then execute all at the same time. This is called loopback because it can be reused when ...

Posted on Wed, 15 Jan 2020 07:38:23 -0500 by dhie

js basic functions

1. Array API of javascript: //Defined array var pageIds = new Array(); pageIds.push('A'); //Array length pageIds.length; //shift: Delete the first item of the original array and return the value of the deleted element; if the array is empty, return undefined var a = [1,2,3,4,5]; var b = ...

Posted on Tue, 14 Jan 2020 02:36:24 -0500 by metrostars

babel source code analysis I

We create a project directly and execute: npm install -D @babel/cli We are using the latest version 7.8.0 Create a test1.js test: /* test.js */ const fn = () => {} new Promise(() => {}) class Test {} const c = [1, 2, 3].includes(1) //Test plug-in 1 var a=10; Create a babel configuration file. b ...

Posted on Sun, 12 Jan 2020 12:40:53 -0500 by kaje

Creation and switching of vue components

Catalog How to create a component 1 How to create components2 How to create a component 3 data and methods in components Component switching - mode 1 Component switching mode 2 Component switch - switch animation (including effect demonstration)   How to create a component 1 <!DOCTYPE h ...

Posted on Sun, 12 Jan 2020 00:48:30 -0500 by freenity

Pure css to realize slide show and press button to change color

Method 1: use a link anchor to realize + jquery to realize button color change by pressing <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta http-equiv="X-UA-Compatible" content="ie=edge"> <s ...

Posted on Fri, 10 Jan 2020 10:59:17 -0500 by smarques

The way of VUE learning (2) Vue.extend of global API

One. Vue.extend definition Vue.extend returns an "extended instance constructor", that is, a Vue instance constructor with some options preset. Vue.component is often used to generate components. It can be simply understood that when a user-defined element with the component name as a label is encountered in the temp ...

Posted on Thu, 09 Jan 2020 11:55:42 -0500 by AStrangerWCandy

Prototype application in JS (inheritance and extension)

Prototypes in JS Prototype is a very important mechanism in JavaScript. Through [[prototype]], we can easily implement the inheritance and extension of constructors and their instances. The concept of prototype is shown in the figure below. For details, please refer to MDN This paper mainly talks about the application of prot ...

Posted on Wed, 08 Jan 2020 13:18:24 -0500 by christo16

Case summary of 3D carousel

    Train of thought: First, build a box, then cut the long box into many li, then each li has four faces (represented by div), and then use background position-x Attribute translates the image by different distances to make a complete image, and then sets the rotation time of each li to a different amount, forming the effe ...

Posted on Mon, 06 Jan 2020 17:21:30 -0500 by andrei.mita

ES6 foundation and deconstruction assignment (high color pop-up case!)

let only works in the current block level scopeVariables declared with let or const cannot be redeclaredlet does not exist variable promotion` console.log(dad); var dad = 'I'm daddy!';//Predefined undefined console.log(dad); let dad = 'I'm daddy!';//Report errors Generate ten buttons and pop up 1 - 10 each time you clickvar m ...

Posted on Mon, 06 Jan 2020 13:15:10 -0500 by crazykid