Vuex tutorial case: counter and list presentation

In this case, github: https://github.com/axel10/Vuex_demo-Counter-and-list In this tutorial, two examples, counter and list, are used to explain the simple use of Vuex. The process from installation to starting the initial page is skipped directly. Note that routing is required during installation. First, create a new store directory and corres ...

Added by brooky on Tue, 31 Mar 2020 23:49:42 +0300

Set global reference file in jsp page

head.jsp file The plug-ins, libraries, etc. that need to be used more often in the project are agreed to be put in a JSP file named head.jsp file, which is equivalent to a global <%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> <!-- Import label Library --> <%@ taglib prefix=" ...

Added by wizhippo on Tue, 31 Mar 2020 19:39:44 +0300

jQuery tutorial 10 - form element selector

Whether submitting or transferring data, the role of form elements in dynamic interactive pages is very important. jQuery adds a form selector, which makes it very convenient to get a certain type of form element. Specific method description of form selector: Be careful: In addition to the input filter selector, al ...

Added by mottwsc on Tue, 31 Mar 2020 12:47:04 +0300

Review of js implementation of sorting algorithm

1. Time complexity is the number of while. Binary search O(h)=O(log2n) 2. Breadth first traversal of nodes function traverse(root){ const queue = [root]; while(queue.length){ const node = queue.shift(); printInfo(node); if(!node.children.length){ continue; } Array.from(node.children).forEach(x=>queue.push(x ...

Added by curioadmin on Tue, 31 Mar 2020 08:17:44 +0300

vue interceptor implements unified token and is compatible with IE9 verification

In the project, vue is used to build the front-end page, and axios requests the back-end api interface to complete the data interaction. If the password token is written in each interface, it is not only a small physical work, but also inflexible. Here we share the use of vue's own interceptor to add token to the header of each request, and it ...

Added by Seamless on Mon, 30 Mar 2020 18:25:36 +0300

The solution of canvas.toDataURL() error reporting is all here

Error reporting details Uncaught DOMException: Failed to execute 'toDataURL' on 'HTMLCanvasElement': Tainted canvases may not be exported. Key word canvas.toDataURL() crossOrigin Access-Control-Allow-Origin Preface Recently, I am making a creative image synthesis tool, which is to generate a product image by splicing customized text and image ...

Added by mckooter on Sun, 29 Mar 2020 15:54:49 +0300

ES6 string extension + regular extension + numerical extension

Template string ``Back quote var cyy={ name:"cyy", age:18, say:function(){ console.log('My name is'+this.name+',I am this year'+this.age+'year'); }, say2:function(){ console.log(`My name is`+this.name+`,I am this year`+this.age+`year`);//Template strings can replace single or ...

Added by inrealtime on Wed, 25 Mar 2020 11:16:24 +0200

Understand 127 common JS program snippets in 30 minutes

This article refers to the original text- http://bjbsair.com/2020-03-22/tech-info/2077/ JavaScript is currently one of the most popular programming languages, as most people say: "If you want to learn a programming language, learn JavaScript." Quincy Larson, the founder of FreeCodeCamp, was asked in a recent interview which language ...

Added by freeheader on Mon, 23 Mar 2020 18:45:36 +0200

Advanced functions of JavaScript

Introduction: welcome to woo's front end. What we bring you today is advanced knowledge of JavaScript. The next series focuses on advanced JavaScript. First, we talk about advanced functions. Definition of high-order function: high-order function refers to the function of operation function; generally, there are two situations in the process o ...

Added by kweathe on Sat, 21 Mar 2020 09:55:53 +0200

User registration interface js verification + form prompt

JavaScript verification requirements: 1. Each item must be filled in or selected, and cannot be empty; 2. User name: it can only contain English letters and underscores, with a length of 6-18 characters; 3. Password: it must contain English letters in upper and lower case and numbers, and the length cann ...

Added by gilang4 on Fri, 20 Mar 2020 20:47:39 +0200