JS node operation
Node overview
1. In JS, nodes can be divided into parent nodes, child nodes and brother nodes. It can also be divided into element node, attribute node and text node 2. The node has at least three basic attributes, nodeType, nodeName and nodeValue
The node type of the element node is 1 (when operating on a node, the element node is usually op ...
Added by rbenfield on Thu, 13 Jan 2022 07:04:44 +0200
Remember the hard journey of introducing TypeScript and composite Api into the old Vue2 project
ReasonAn existing project was created two years ago. With the passage of time, the amount of code has soared to nearly tens of thousands of files, but the engineering has gradually become unmaintainable. I want to give him a big change, but there are too many intrusive code configurations... Finally, TypeScript, combinatorial Api and vueuse are ...
Added by space1 on Thu, 13 Jan 2022 06:10:00 +0200
Array method Encyclopedia
Array method
1.Array.from()
from() is used to convert the class array structure into an array instance and return a new array
// The string is split into a single character array
console.log(Array.from("Matt")); // ["M", "a", "t", "t"]
// Array.from() performs a shallow copy of an existing array
const a1 = [1, 2, 3, 4];
const a2 = Array.fr ...
Added by nykoelle on Thu, 13 Jan 2022 03:56:11 +0200
The knowledge points of callback function in JavaScript are all here!
Author: shadeTranslator: front end XiaozhiSource: dmitripavlutinThere are dreams and dry goods. Wechat search [Daqian world] pays attention to this bowl washing wisdom who is still washing dishes in the early morning.This article GitHub https://github.com/qq449245884/xiaozhi It has been included. There are complete test sites, materials and my ...
Added by wjwolf79 on Thu, 13 Jan 2022 02:24:52 +0200
AJAX-04 (homology & cross domain) (anti shake & throttling)
1. Homology Strategy & cross domain
1. Homology: two URL addresses have the same protocol, host name and port number.
The Same origin policy is a security function provided by the browser.
The browser's homology policy stipulates that resource interaction between non homologous URL s is not allowed.
2. Cross domain:
Homology mean ...
Added by Scud on Wed, 12 Jan 2022 23:04:10 +0200
Vue component slot
catalogue
1, Component slot
1.1. Single slot
2.2 named slot
2.3. Scope slot
Slot, I want to drill into your arms
Default slot
Named slot
Scope slot
Slot defaults
1, Component slot
The biggest feature of components is reusability, and good use of slots can greatly improve the reusability of components
1.1. Single slot
When the chil ...
Added by dwest on Wed, 12 Jan 2022 22:38:34 +0200
Network protection notes -- XSS vulnerability exploitation
Browser homology policy
summary
In 1995, the same origin policy was introduced by Netscape. At present, all browsers implement this policy. Initially, it means that the Cookie set by page A and page B cannot be opened unless the two pages are "homologous". The so-called "homology" refers to "three sameness": ...
Added by fahhem on Wed, 12 Jan 2022 20:15:02 +0200
javaScript learning notes "switch statement", "breakpoint", "ternary operation", "while loop" and "for loop"
switch Statements
Swith statement structure:
switch (key) {
case value:
break;
case value:
break;
case value:
break;
default:
break;
}
var x = prompt('Please enter an option A-D');
switc ...
Added by NS on Wed, 12 Jan 2022 20:08:24 +0200
HTML Personal Learning
It is well known that the W3C standard consists of three main components: structured HTML, presentation CSS, and behavior JavaScript. The full name of HTML is "Hyper Text Markup Language". In short, web pages are made in HTML.
The HTML language is loosely structured and does not require high case and formatting, but it uses a standar ...
Added by tallberg on Wed, 12 Jan 2022 19:06:53 +0200
Beautiful soup is used for html file parsing
Beautiful soup 4 converts complex HTML documents into a complex tree structure. Each node is a Python object. All objects can be summarized into four types:
TagNavigableStringBeautifulSoupComment
Test file: baidu.com html
Please put the file contents in the root directory of the project
File content
<!DOCTYPE html>
<html>
< ...
Added by JasonO on Wed, 12 Jan 2022 11:00:07 +0200