javascript Focus - Deep Copy and Shallow Copy

I. Deep and shallow copies of arrays When using JavaScript to manipulate arrays, we often need to backup arrays. It turns out that if we simply assign it to other variables, then we only need to change one of them, and then the others will change, which leads to problems. Why is that? Because if it's just a simple assignment, it's just a refere ...

Posted by hmgroen on Wed, 27 Mar 2019 13:18:29 -0700

jQuery Source Learning - Simple dom Encapsulation (I)

Self-taught js for about half a year, should be said to be intermittent learning for half a year, in the middle of all kinds of work, a variety of moods impetuous, ashamed. This year, we must find a front-end job on the web, otherwise the family can not account for it, they have to save some money, get married. For the future, in order to be a ...

Posted by unkwntech on Wed, 27 Mar 2019 05:00:31 -0700

Priority of CSS Styles

1. When multiple styles are referenced by the same element, the style attributes in the back row have higher priority. For example, the following div refers to both styles in [.default] and [.user], where the width attribute in [.user] style replaces the width attribute in [.default] style. <!DOCTYPE html> <html> <head> ...

Posted by Errant_Shadow on Tue, 26 Mar 2019 16:42:28 -0700

Common Git commands

Here are three commands from the Internet [commit] denotes the corresponding version number Generally speaking, just remember the command 6 below for daily use. But skilled use, I'm afraid to remember 60 to 100 commands. Here are some of the common things I've sorted out. Git List of commands. The translations of severa ...

Posted by webren on Tue, 26 Mar 2019 10:00:30 -0700

[requirejs] basic summary

1. Recognition Recognition Recognition Recognition Recognition Recognition Recognition Recognition Recognition                                                                                                  GitHub's own code RequireJs is a js file for modular management of js files, which belongs to an implementation of AMD specific ...

Posted by hossfly007 on Sun, 24 Mar 2019 13:09:29 -0700

Front-end coding specification: javascript specification

Global Namespace Pollution and IIFE Always wrap the code into an IIFE (Immediately-Invoked Function Expression) to create an isolated domain of definitions. This approach prevents global namespaces from being polluted. IIFE also ensures that your code is not easily modified by code in other global namespaces (such as third-party libraries, wi ...

Posted by culprit on Sun, 24 Mar 2019 06:09:30 -0700

set and get of css attribute with native JS code

Now let's implement a simple version of the plug-in, which can achieve the acquisition and setup of css attributes without the help of jQuery. First step First, create a css-tool.js file. At first, it looks like this: (function(window,undefined){ "use strict"; var cssTool = function(){ return new cssTool.prototype.init(); } ...

Posted by Simsonite on Sat, 23 Mar 2019 19:42:27 -0700

uploadify cancels file upload

uploadify uses How to upload files using uploadify, you can find it on the Internet, but you need to pay attention to the version number. I just want to talk about how to cancel the upload after the file has been successfully uploaded to the server.I use auto upload, which sets the'auto'property to true.1. First, we need to set the cancelmg ...

Posted by pjleonhardt on Sat, 23 Mar 2019 09:51:53 -0700

The use of demo in ztree

zTree is the core code of JQuery to implement a set of Tree plug-ins that can accomplish most of the common functions. Compatible with IE, FireFox, Chrome and other browsers Multiple Tree instances can be generated in one page at the same time Support JSON data Supporting one-time static generation and Ajax asynchronous loading Support m ...

Posted by vamosbenedikt on Fri, 22 Mar 2019 12:06:53 -0700

Explain the Curitization of JavaScript Functions in detail

Explain the Curitization of JavaScript Functions in detail Baidu Encyclopedia's Interpretation of Curitization: In computer science, Currying is a technique that converts a function that accepts multiple parameters into a function that accepts a single parameter (the first parameter of the original function), and returns a new function that a ...

Posted by missyevil on Thu, 21 Mar 2019 21:51:52 -0700