An evaluation question of Ali

  Title: const timeout = ms => new Promise((resolve, reject) => { setTimeout(() => { resolve(); }, ms); }); const ajax1 = () => timeout(2000).then(() => { console.log('1'); return 1; }); const ajax2 = () => timeout(1000).then(() => { console.log('2'); return 2; }); c ...

Posted by php_dev_101 on Fri, 31 Jan 2020 08:23:31 -0800

HandyEditor rich text editor integrated into Python flash project

1. Download HandyEditor at http://he.catfish-cms.com/   2. The unzipped file name HandyEditor master is changed to HandyEditor. The files in the folder are as follows   3. Put the HandyEditor folder into the static folder of the project, and create a new folder named uploadPhotos in the static folder to put the uploaded pictures   4. Modify ...

Posted by MarcAndreTalbot on Fri, 31 Jan 2020 07:14:15 -0800

Shopping cart settlement function JS

Shopping cart settlement function Layout: <ul>      <li></li>     <li></li>     <li></li>     ............ </ul> <p><p> Each li label represents that there are + - product quantity function in each product unit price and subtotal What is the most expensive pr ...

Posted by Zoud on Fri, 31 Jan 2020 05:42:27 -0800

node web module (server and client)

node web module web server Web server refers to website server, which refers to a program residing on the Internet, the basic function of web browser, and provides information browsing service The web supports the script language on the server side. The script language obtains data from the database and returns the results ...

Posted by fireant on Fri, 31 Jan 2020 01:59:15 -0800

Web front-end knowledge combing -- Javascript common syntax

JavaScript, like HTML and CSS, is the three necessary modules for Web front-end development. In addition, JavaScript is also the basic language of Vue, Ext, jQuery and other frameworks, so the learning of JavaScript is crucial. In fact, after learning the C + + language and Java, I feel that the basi ...

Posted by smiley_kool on Wed, 29 Jan 2020 21:06:05 -0800

html click round diffusion display interface effect

Opening remarks Effect Core code used Reflection explore Source code Compatibility issues Opening remarks It is common to see that some app s have some click-and-diffuse effects, some act as diffuse display interfaces, some diffuse change theme colors, and want to be implemented on Web pages, so there is this. Effect Don't want to be direc ...

Posted by deljhp on Tue, 28 Jan 2020 10:52:23 -0800

Export jsp content to Excel table

<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html xmlns:x="urn:schemas-microsoft-com:office:excel"> <script type="tex ...

Posted by satre on Tue, 28 Jan 2020 08:40:29 -0800

JavaScript syntax: error handling mechanism

1. Error Instance Object When JavaScript parses or runs, the engine throws an error object whenever an error occurs.JavaScript natively provides the Error constructor, and all errors thrown are examples of this constructor. var err = new Error('Error'); console.log(err.message); // "Error" ...

Posted by seavolvox on Mon, 27 Jan 2020 21:58:28 -0800

Use of JavaScript document fragments

In JavaScript, document fragment is independent of DOM tree and exists in memory. It is a blank document fragment at the beginning of creation. We can use createDocumentFragment to create it let fragment = document.createDocumentFragment(); The operations on document fragments, including inserting node ...

Posted by pouncer on Sun, 26 Jan 2020 21:10:30 -0800

Use.apply() with the'new'operator.Is this possible?

In JavaScript, I want to create an object instance (via the new operator), but pass any number of parameters to the constructor.Is this possible? What I want to do is (but the code below doesn't work): function Something(){ // init stuff } function createSomething(){ return new Something.apply(null, arguments); } var s = createSom ...

Posted by tryingtolearn on Sun, 26 Jan 2020 17:57:58 -0800