• Common methods of adding, deleting, modifying and checking HTML DOM with JavaScript


    This paper describes the common methods of adding, deleting, modifying and querying HTML DOM by JavaScript. For your reference, the details are as follows: First of all, JS can modify all elements and attributes in HTML. It can also change CSS style, and can listen to all events and respond. This note mainly records how […]

  • JavaScript variable, data type, basic instance details [variable, string, array, object, etc.]


    This article describes the JavaScript variables, data type basis. For your reference, the details are as follows: In this note, I record the basic knowledge of variables and data types. Because they are related, they are recorded together How to declare variables Variable declaration uses the VaR keyword. Here are some examples of variable declaration: […]

  • Summary of cross domain access of Ajax and jsonp


    ####Ajax of JavaScript AJAX is “asynchronous JavaScript and XML”An important technology used in Ajax design is the XMLHttpRequest object. How to create an XMLHttpRequest object: xmlhttp = new ActiveObject(” Microsoft.XMLHTTP “); / / creation methods supported by IE browserXmlhttp = new xmlhttprequest(); / / creation methods supported by browsers such as Firefox and operaXmlhttp is […]

  • JavaScript regular expression Basics


    Regular expression: Syntax / expression /, the slash indicates the starting position Creation method:     1、var regObj = new RegExp(“pattern”,[,”flags”]);Pattern: required, string of regular expression;Flags: optional, some flag combinations.2. Var regobj = / pattern / [flags]; in this way, pattern and flags cannot be enclosed in quotation marks. Methods to represent regexp objects regularly: Exec: […]

  • Do you know how to use JavaScript symbol types


    Symbol type According to the specification, the property key of an object can only be of string type or symbol type. It’s not number, it’s not Boolean, it’s only string or symbol. So far, we’ve only seen strings. Now let’s take a look at what symbols can do for us. Symbol The “symbol” value represents […]

  • 11 + JavaScript features you may never use (summary)


    important Most of the features described in this article have been suspended (or even not recommended). They are still common in many books, so they are worth learning. 1、 Comma operator Is the operator used to separate expressions and return the last expression in the chain. let oo = (1, 2, 3) console.log(oo) // 3 […]

  • Detailed explanation of three methods of JavaScript copying variables


    This article mainly introduces three methods of JavaScript copying variables. The example code is introduced in detail, which has certain reference learning value for everyone’s study or work. Friends in need can refer to it When a variable is directly assigned to another variable, the system does not create a new variable, but assigns the […]

  • Front end interview daily 3 + 1 – day 140


    Today’s knowledge points (September 3, 2019) – day 140 [HTML] what’s your understanding of HTML5’s keygen tag? What’s its function? Can transition in [CSS] CSS3 be used to transition opacity and display? [JS] talk about the function of encapsulating a tab with native JS [soft skills] do you know PHP, Java, python or go? What […]

  • Judging whether the contents of two objects are equal based on JavaScript


    This article mainly introduces how to judge whether the contents of two objects are equal based on JavaScript. The example code is introduced in detail, which has certain reference learning value for everyone’s study or work. Friends in need can refer to it In ES6, there is a method to determine whether two objects are […]

  • Collation of minor problems easy to be ignored in JavaScript regular expression


    1、 The special characters in bracket () do not need to be escaped. For example, [/], [.], [*], [?], [+] can directly match the corresponding characters \. *? +. Here are the test results: Therefore, / [\ D.] / is actually a regular expression that matches a numeric character or the character “.”, which is […]

  • Cross site scripting attack XSS


    Introduction to XSS XSS is the abbreviation of cross site scripting. However, from the way of naming the initial letter, it should be named CSS, but it is the same name as cascading style sheets (CSS), so it is named XSS. XSS attack, generally refers to an attack way in which the attacker injects malicious […]

  • Vue Axios secondary packaging


    import axios from ‘axios’;import QS from ‘qs’; //Environment switching// if (process.env.NODE_ENV === ‘development’) {// axios.defaults.baseURL = ‘’;// } else if (process.env.NODE_ENV === ‘production’) {// axios.defaults.baseURL = ‘https://www.production.com’;// } axios.defaults.timeout = 5000;//HTTP request interceptoraxios.interceptors.request.use( config => { config.headers = { ‘Content-Type’:’application/x-www-form-urlencoded’ } return config; }, error => { return Promise.reject(error); }); //Response interceptor is exception handlingaxios.interceptors.response.use( […]