JS-16-Array Advanced API

1. On Array Advanced API Note: Attributes in objects are out of order For-in loops are designed to traverse objects, but the properties of objects are out of order, so for-in loops are designed to traverse out of order, so for-in loops are not recommended for traversing arrays. 1. Traverse the array using the for of loop intro ...

Posted by sagetim on Tue, 14 May 2019 12:13:30 +0200

Functions are the introduction of apply() and call().

Application, call in function When it comes to apply,call begins by talking about their origins with functions. Javascript functions are both objects It is no different from other javascript objects. And each function contains two non-inherited methods, apply() and call(), which can call functions indirectly. For example: function f() { c ...

Posted by ThunderLee on Sun, 12 May 2019 13:12:06 +0200

How to Manage z-index in Web Componentization

z-index attributes, although so much has been written, are still widely misunderstood and mishandled. Stacking problems in complex single-page web applications can become a major problem. Sticking to some principles, however, we can easily avoid these problems. If you've ever had any complex Web UI development, you might sometimes go crazy tryi ...

Posted by immanuelx2 on Sun, 12 May 2019 12:10:21 +0200

Realization of 2048 mini-games with JS

Preface: What I have been doing for a year is back-end stuff. I haven't written the front-end code. I forgot about it. I used jQuery before, but I can still do something good. Think of picking up a little, or waste the cultivation of the master. I've been reading blogs, but I don't have anything of my own. this has to change. why not start now? ...

Posted by shaitan on Sun, 12 May 2019 10:16:18 +0200

Front-end Asynchronous Solution-3 (Promise)

I haven't written for a few days. I've been learning Promise and generator intermittently these days. Today I can finally solve the asynchronous problem by combining the two things. Today I would like to share with you the usage of promise and the handling of asynchrony.As usual, let's simulate a Promise first. //Cough, that's how it works. let ...

Posted by philip@hux.co.za on Sun, 12 May 2019 07:51:26 +0200

Several ways of js inheritance

How to implement JS inheritance: Now that we want to achieve inheritance, we first have to have a parent class, the code is as follows: function Animal(name) { // attribute this.name = name || 'Xiao Bai'; // Example method this.sleep = function () { console.log(this.name + 'Sleeping in!'); } ...

Posted by a.heresey on Sun, 12 May 2019 05:29:08 +0200

The problem of using jQuery $(this) in ES6

$('.js-bottom-btn').click((event) => { let flag = $(event.currentTarget).date('flag'); ... }) Turn 1 The transition to laravel-mix ES6 started in the old project. The meaning of $(this) in the arrow function when used with jQuery has changed.   The main reason for this problem is that it is not clear. Arrow function: $('.j ...

Posted by renegade33 on Sat, 11 May 2019 02:12:17 +0200

Introduction to apply and call in functions

Application, call in function When it comes to apply,call begins by talking about their origins with functions. Javascript functions are both objects It is no different from other javascript objects. And each function contains two non-inherited methods, apply() and call(), which can call functions indirectly. For example: function f() { c ...

Posted by alexguz79 on Sat, 11 May 2019 01:18:48 +0200

Canvas Utility Library Fabric.js Manual

brief introduction What is Fabric.js? Fabric.js is a library that can simplify Canvas programming. Fabric.js provides Canvas with the missing object model, svg parser, interaction and a set of other indispensable tools. Because Fabric. JS is a foreign framework, the official API is messy and numerous, most of the relevant documents are English ...

Posted by guttyguppy on Fri, 10 May 2019 21:12:38 +0200

PHP Full Stack Learning Notes 13

PHP Full Stack Learning Notes 13 php and ajax technology With the arrival of web2.0, Ajax has gradually become the mainstream, what is ajax, the development mode of ajax, the advantages, and the use of technology.(ajax overview, technology used by ajax, issues to be noted, application of Ajax technology in PHP) What is ajax ...

Posted by Chelsove on Fri, 10 May 2019 16:46:59 +0200