HTML5 load new page insensibly (next page + non ajax+history.pushState)

1, Modify the url without refreshing the page Case 1: setting anchor characteristics (taking the code of the tab in bootstrap as an example) Use the anchor mode to switch. When the page is refreshed, it will also be located to the specified page. However, if the page content is too long and the scroll bar appears, the anchor will be locate ...

Posted by golfinggod on Fri, 15 Oct 2021 22:26:46 -0700

HR background management system project - login page - implementation steps

1. Landing page - style adjustment The overall idea of the landing page is as follows: Form validation (login/index.vue) utils/validate.js ---> validMobile Collect user parameters and call actions Call the encapsulated api in api/user.js Find the axios instance: get the axios instance in utils/request.js Set base address f ...

Posted by arkismad on Fri, 15 Oct 2021 13:01:32 -0700

JS common sorting algorithms

Reprinted from https://www.cnblogs.com/AlbertP/p/10847627.html First, summarize the above figure Bubble sorting Idea: swap the largest number in the remaining array to the tail each time function bubbleSort(arr) { var len = arr.length; for (var i = 0; i < len; i++) { for (var j = 0; j < len - 1 - i; j++) { ...

Posted by roadkillguy on Fri, 15 Oct 2021 11:30:31 -0700

Six ways of JS inheritance

Interface inheritance cannot be implemented in ECMAScript because the function is not signed. ECMAScript only supports inheritance, and its main way to realize inheritance depends on prototype chain. Prototype chain inheritance          Relationship between constructor, prototype chain and instance: eac ...

Posted by sergio-pro on Fri, 15 Oct 2021 11:17:02 -0700

Implement a color selector from scratch (native JavaScript Implementation)

Project directory and file creation First of all, we don't need to build the project environment. We still directly use the simplest way, that is, the introduction method, to create the project, which makes it convenient for us to test while writing. Create an empty directory named ColorPicker, create a JS file, color-picker.js, then create an ...

Posted by athyzafiris on Thu, 14 Oct 2021 16:56:30 -0700

Quick learning TypeScript - concise and key manual - Volume I

👉 About the author As we all know, life is a long process, constantly overcoming difficulties and constantly reflecting on the process of progress. In this process, there will be a lot of questions and thoughts about life, so I decided to share all my thoughts, experiences and stories in order to find resonance!!! Focus on Android/Unity an ...

Posted by RobM on Thu, 14 Oct 2021 16:15:52 -0700

On Vuex -- a quick start for beginners

What is Vuex? Vuex   It is a state management mode specially developed for Vue.js application. It adopts centralized storage to manage the state of all components of the application and solve multi-component data communication. main points: vue is officially matched and used exclusively (similar to vue router), with special debugging ...

Posted by jimmy patel on Thu, 14 Oct 2021 15:14:25 -0700

[intermediate and advanced front end] necessary, 30 + high-frequency handwritten questions and detailed answers (10000 words long text). See how "you" can embarrass me

preface ❝ Write a quick row. Can you write a Promise A deep copy... I believe you have encountered such problems in the interview or daily business more than once. You feel familiar when writing code on site, but even if you can't write it, the expected offer is far away from us o(╥﹏╥) o. Come on, guys, roll up. The daily plan is not enou ...

Posted by radstorm on Thu, 14 Oct 2021 14:48:38 -0700

[React] advanced component

1, Introduction to component communication Components are independent and closed units. By default, they can only use their own data. In the process of componentization, we split a complete function into multiple components to better complete the functions of the whole application. In this process, it is inevitable to share some data am ...

Posted by pleisar on Thu, 14 Oct 2021 13:02:02 -0700

React source code analysis -- ReactChildren.js

2021SC@SUDSC 2021SC@SUDSC ReactChildren.js As anyone who has read the source code knows, this js file exports five methods: export { forEachChildren as forEach, mapChildren as map, countChildren as count, onlyChild as only, toArray, }; Then in the React.js file: const Children = { map, forEach, count, toArray, on ...

Posted by Codewarrior123 on Thu, 14 Oct 2021 11:58:46 -0700