JavaScript high programming -- Array type

Create array The Array constructor creates an Array Create an empty array var arr = new Array();//[] arr.length //0 Create an array with a length of 10 var arr = new Array(10) arr.length //10 Creates an array containing the specified element //The data type of each element of the array in ECMAScript can be different var arr = new Array ...

Posted by danj on Sun, 30 Jan 2022 03:36:16 +0100

JS rewrites form validation using policy mode

Original verification Now we have a form: <form action="/" id="myForm" method="POST"> user name:<input name='user' type="text"> password:<input name='pwd' type="text"> <button type="submit" name='btn'>Submit Form </button> </form> We need to do form verification, so the common writing method ...

Posted by stevenm on Sat, 29 Jan 2022 20:12:57 +0100

06 JavaScript summary of advanced knowledge points

1, Constructors and prototypes 1. Why can the new operator create an instance object? (1) Create a new empty object in memory. (2) Inherit the prototype of the constructor. (3) this points to the new object and calls the constructor. (4) Returns a new object.   2. Prototype and prototype chain (1) Prototype Each function has a prototyp ...

Posted by irish on Sat, 29 Jan 2022 20:03:32 +0100

520 on Valentine's day, I sent a gift to my girlfriend with code ~ html+css+javascript to realize the cherry blossom love album "you can give it to the person you like"

❉ 520 on Valentine's day, I sent a gift to my girlfriend with code ~ html+css+javascript to realize the cherry blossom love album "you can take it to the person you like" The annual / 520 Valentine's Day / Tanabata Valentine's Day / birthday gift / advertising younger martial sister / Christmas / New Year's Day / New Year's Day / pro ...

Posted by Nhoj on Sat, 29 Jan 2022 16:26:24 +0100

Sorting out the basic knowledge points of bootstrap framework

Basic template and code comments <!doctype html> <html lang="zh-CN"><!--current html The page is in simplified Chinese--> <head> <meta charset="utf-8"><!--set up html Character set of the page--> <meta http-equiv="X-UA-Compatible" content="IE=edge"><!--use IE The latest rendering mod ...

Posted by johnnyblaze9 on Sat, 29 Jan 2022 15:08:54 +0100

Event cycle question

preface: Before that, let's first introduce that Js is a single threaded language. The code is executed from top to bottom. When encountering synchronous code, it will not stop when some code is asynchronous. If it stops, it will be very time-consuming, so there is the concept of task queue at this time. When encountering asynchronous code, In ...

Posted by Norman Graham on Sat, 29 Jan 2022 10:02:30 +0100

Basic introduction notes of wechat applet development

vsc installation plug-in (applet development assistant - wechat applet development assistant) Then you can start with wx - in vsc, and there will be a prompt alt + up and down arrow move code ctrl + alt + ↓: copy the current line down Daily attention: 1. There must be no space between the string and curly braces, otherwise the rec ...

Posted by dodgeqwe on Sat, 29 Jan 2022 08:17:04 +0100

[front end basics] JavaScript is precompiled. Those who just touch the front end should learn it quickly, otherwise they will be "ill fated"

js has three steps: 1. Syntax analysis; 2. Precompiling; 3. Interpretation and execution There are two types of precompiling: first, global precompiling; 2, Partial precompiling. It is precisely because of precompiling that there are variable promotion (excluding assignment) and overall function declaration promotion in js. Global pre ...

Posted by nobertos on Sat, 29 Jan 2022 07:00:15 +0100

Node.js learning ten (url)

preface A complete url is divided into several parts, such as the following website:       http://www.tmooc.cn:80/detail.html?lid=5 It consists of the following protocol + domain name + port number + which file on the server to be requested + data passed to the server. Now let's learn about url in detail. 1, What is a url module The ur ...

Posted by s3rg1o on Sat, 29 Jan 2022 06:16:19 +0100

AJAX, Axio asynchronous framework (encapsulation of native AJAX). web partition

1. Understanding of Ajax In the past, the data in the server was stored in the Servlet domain, and then sent to JSP for display. With AJAX, you can communicate with the server. JSP is not required as a page. The data can be sent to the browser in the Servlet and then displayed on the HTML page. 1.1 previous methods 1.2 current ...

Posted by sloth456 on Sat, 29 Jan 2022 03:59:39 +0100