JS Basics: Events

1, Event binding method 1.1 inline mode In the inline model, an event handler is an attribute of an HTML tag that handles a specified event. Although inline was widely used in the early days, it was mixed with HTML and was not separated from HTML. //In HTML, the event handler function is used as an attribute to execute JS code <i ...

Added by raptoni on Mon, 08 Nov 2021 16:24:16 +0200

Niuke monthly competition 40 (problem solving report)

catalogue A - Digital Games Title: ​  Train of thought analysis: Code implementation: B-jump jump jump Title: Train of thought analysis: Code implementation: C-number matching Title: Train of thought analysis: Code implementation: D-graceful string Title: Train of thought analysis: Code implementation: E-grouping Title: Trai ...

Added by _spaz on Sat, 06 Nov 2021 18:21:03 +0200

ES6 learning notes -- numerical expansion

preface: ES6 also provides many convenient operations for our numerical operation. Please refer to the official documents for details. 1, Binary and octal notation ES6 provides a new way to write Binary and Octal values, which are represented by prefixes 0b (or 0b) and 0o (or 0o) respectively. 0b111110111 === 503 // true, binary 0o767 === ...

Added by ThinkGeekness on Sat, 06 Nov 2021 05:06:57 +0200

[Shanda Zhiyun Project Log] seahub frontend components common for source code analysis

2021SC@SDUSC This time, combined with the deployed web application interface of the original seafile, and then starting from the source code, find out the corresponding components on the page. Map each component of the page to the code. First from components Lower common Start under the folder. Sub components in the header component of the home ...

Added by Cloud on Sun, 31 Oct 2021 16:41:47 +0200

15 common JavaScript shorthand skills

home pagespecial columnjavascriptArticle details015 common JavaScript shorthand skillsBreak into the world with spicy sticks in your mouth Published 14 minutes ago1. Declare variablelet x; let y = 20; // Abbreviation let x, y = 20;2. Assignment of multiple variablesWe can use array deconstruction to assign values to multiple variables in a ro ...

Added by xtopolis on Fri, 29 Oct 2021 08:06:41 +0300

Constructor, prototype and inheritance are so simple? Come on! explain profound theories in simple language

Constructor The method of defining classes by keyword class and then creating objects according to classes introduced in the previous blog is the syntax in ES6. At present, many browsers do not support ES6 very well, so we should also learn to create objects by constructor (build function) Ask? Since the browser's support for ES6 is not very ...

Added by foreverhex on Wed, 27 Oct 2021 03:27:29 +0300

JavaScript simple meal - class, the man is back!

preface The purpose of writing this series of articles on JavaScript simple meal is to record various knowledge points when reading and learning the book JavaScript advanced programming (4th Edition). Although it is a note and summary of reading, I hope it is light, concise and sharp, will not cause reading fatigue, and can take a light ...

Added by brettpower on Sun, 24 Oct 2021 13:07:56 +0300

JavaScript functional programming - Getting Started Guide

JavaScript functional programming 1, What is functional programming **Definition: * * functional programming is a programming paradigm, which consists of function calls and function combinations. It can be regarded as a pipeline. Data can flow from the output of one function to the input of another function, and finally output the result. ...

Added by ashii on Sat, 23 Oct 2021 15:36:48 +0300

js function coritization

Function corrilization is closely related to function binding (see the previous article) It is used to create a function with one or more parameters already set The basic method of function coritization is the same as function binding: that is, use a closure to return a function The difference between the two is that when the function is called ...

Added by davidklonski on Fri, 22 Oct 2021 14:24:00 +0300

Less than 15 lines of code implement an async/await

async/await is the executor of the generator. If you want to implement async/await, you must find out what the generator is about. 1. What is the generator function The generator is a function that generates an iterator, and the yield expression is a flag that suspends execution. You must call the next method of the iterator object to resume ...

Added by sinisake on Fri, 22 Oct 2021 08:21:04 +0300