Front-end multi-person collaboration-global variable contamination problem (anonymous IIFE/ES6 block-level scope)
Preface
In large-scale front-end project development, every developer can define and save all the global variables of application resources. If too many global variables are defined, it is likely to cause conflicts among global variables, that is, ...
Posted by justdiy on Wed, 11 Sep 2019 02:06:35 -0700
jQuery Selector (Basic Edition)
For jQuery calls, we typically pass in parameters
html: <div></div>
js: console.log($('<a />'));
console.log($('div'));
1. Preposition (DOM object and jQuery object)
DOM objects,
This should be the basic knowledge of the front end. In the document object model, each part is a node.
jQuery object
This refers to the ob ...
Posted by mdj on Mon, 09 Sep 2019 01:53:26 -0700
Namespaces and modules
introduce
A module is executed in its own scope, not in the global scope, which means that variables, functions, classes, etc. defined in a module can only be used after the module is introduced
Export declarations: Any declaration can be exported by adding the export keyword (for example, variables, functions, classes, type aliases, or inter ...
Posted by lush_pierre on Fri, 06 Sep 2019 09:17:43 -0700
jQuery (Cascading, CSS, Properties)
Series operation
Layout of basic HTML
<div id="box">
<ul>
<li class="item1">1</li>
<li>2</li>
<li class="item2">3</li>
<li>4</li>
<li>5</li>
</ul>
</div> ...
Posted by Hitman2oo2 on Fri, 06 Sep 2019 04:28:58 -0700
JQuery source parses the conversion between jQuery objects and DOM objects
The jQuery object is a class array object that holds a reference to the corresponding DOM. We can either get the DOM node in an index directly with [], get the DOM node in an index with get method, or convert the jQuery object into an array at once with toArray(), for example:
<!DOCTYPE html>
<html lang="en">
<head>
<m ...
Posted by aditya2071990 on Sun, 01 Sep 2019 17:47:02 -0700
Koa - Upload files using koa-multer (upload restrictions, error handling)
Preface
Uploading files is a very common operation in development. Today I choose to use koa-multer middleware to achieve this function. In addition to uploading files, I will also restrict file upload and handle upload errors.
Since the original koa-multer has stopped maintenance, we need to use the latest @koa/multer. This module is a branc ...
Posted by Penelope on Sun, 01 Sep 2019 03:41:19 -0700
Twenty commonly used JavaScript string methods
Summary: Play around JS strings.
Original: JS Top 20 Common String Methods and Usage
Translator: Front-end wit
Fundebug Copyright shall be owned by the original author when authorized to reproduce.
This paper mainly introduces some of the most commonly used JS string functions.
1. charAt(x)
charAt(x) returns the character at the x position i ...
Posted by phpform08 on Thu, 29 Aug 2019 18:47:43 -0700
JS Top 20 Common String Methods and Usage
To read more good articles, please Punch GitHub Blog Hundreds of excellent articles a year are waiting for you!
In order to give back to the reader, Daqian World is held on an irregular basis (one to three times a month), a cash lottery, a bottom 200, plus user appreciation. Hope you can become a little brocade in Daqian World. Try it now
This ...
Posted by kabucek on Thu, 29 Aug 2019 17:05:14 -0700
Cascade query of regional information based on layUI invoking background data
Implementing cascaded query of regional information by calling background data based on layUI
1. Basic Ideas
Background provides a common interface for querying region lists based on region coding
Page Initialization Calls Background Interface to Load All Provinces
Click on the province to send the province area code to the background to q ...
Posted by yaba on Fri, 23 Aug 2019 02:42:26 -0700
The Best Used Mysql Tool under MAC: Sequel Pro Extension (bundle) Single Line Display Tool
Has been looking for a better mac Mysql toolTry a few:Navicat is really a cardtableplus is a good idea, but what's more painful is the fee.At first, Sequel Pro didn't work well, but now it feels perfect and needs to be tuned up.
Directly into the theme:1.Sequel Pro settings prompt delay is 0.5s, which I have been using the default, prompt super ...
Posted by TimR on Thu, 22 Aug 2019 23:58:11 -0700