Tag:javascript

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

    Time:2020-11-23

    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.]

    Time:2020-11-22

    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

    Time:2020-11-8

    ####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

    Time:2020-10-21

    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

    Time:2020-9-27

    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)

    Time:2020-9-26

    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

    Time:2020-9-8

    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

    Time:2020-9-4

    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

    Time:2020-8-27

    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

    Time:2020-8-3

    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

    Time:2020-8-2

    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

    Time:2020-8-1

    import axios from ‘axios’;import QS from ‘qs’; //Environment switching// if (process.env.NODE_ENV === ‘development’) {// axios.defaults.baseURL = ‘http://172.16.70.100:9999/qd’;// } 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( […]