Four Ways of JavaScript Asynchronous Programming
Asynchronous programming is a problem that every JavaScript programmer will encounter, whether it's a front-end ajax request or a node's various asynchronous API s. This article will summarize four common methods to deal with asynchronous programming.
callback
The use of callback functions is the most common form. Here are a few examples:
// jQ ...
Posted by moty66 on Tue, 18 Jun 2019 10:48:50 -0700
H5 front-end project starts with basic layout
We then went on to the previous project. The first part mainly talked about the skills we need to master at the front end, and quickly built the project through vue.js and element-ui. But as I said before, I don't like using third-party things very much. So I don't need bootstrap, nor jquery, nor any tripartite components. I only use Vue family ...
Posted by betportal on Sun, 16 Jun 2019 16:01:40 -0700
JAVA-26.1-jQuery Base, Dispatch Events, Effects, Selectors
One: Introduction of jQuery
jQuery is essentially a js class library that encapsulates commonly used methods and objects for our convenience.
1. Our previous DOM programming: var obj = Document.getElementById(id); what object is obj obtained here - the DOM object
2. If we want to use some of the methods and attributes already encapsulated i ...
Posted by affluent980 on Sun, 16 Jun 2019 10:19:47 -0700
Spring MVC -- Verification by sending short messages on mobile phones when registering
When writing a registration, I want to use the mobile phone number to verify, to ensure the user's safe operation, because the previous use of email verification is too troublesome. So we found a better third party on the Internet to provide short message service.
Try it, the speed is good, basically three seconds or so can receive short ...
Posted by belphegor on Fri, 14 Jun 2019 18:36:51 -0700
js learning summary - built-in dom operation attributes and methods
DOM(document object model): Document object model,
Provides a way to get the elements in the page:
document.getElementById();
Context. getElements ByTagName (TAGNAME)// Get all tags named TAGNAME for the neutron grandchildren of the specified container
Context. getElements ByClassName (CLASSNAME) // Incompatible under ie6-8
document.getElements ...
Posted by grayson on Fri, 14 Jun 2019 15:12:05 -0700
Various drop-down menus (summary after class)
Implementation of Dropdown Menu with HTML and CSS
The code for the html section is as follows:
<div id="nav">
<ul>
<li ><a href="#">home page</a></li>
<li><a href="#">Learning Center</a>
<ul>
<li><a href="#">JavaScript&l ...
Posted by adamb10 on Wed, 12 Jun 2019 17:31:22 -0700
Event module reading Zepto source code
Event module is one of Zepto's essential modules. Event object is complex because of its unfamiliar with Event Api. So at first glance, the source code of Event module is a bit confusing. Looking at it carefully, it's actually not too complicated.
Read the Zepto source series on github. Welcome star: reading-zepto
Source version
The source code ...
Posted by aconway on Wed, 12 Jun 2019 14:01:51 -0700
Document upload forms
As programmers, we often use the upload and download functions of files. When it's time to use it, check all kinds of information. There's wood. There's wood. In order to facilitate the next use, here is a summary and a memorandum.
Using Form to Upload Files
The most primitive, simple and rude file upload.
Front-end code:
//Mode 1
<form acti ...
Posted by mailtome on Tue, 11 Jun 2019 15:03:08 -0700
pug template engine (original jade)
Previous remarks
Why do we introduce pug? What's so special about pug? There are some deeper nested pages that may appear nested, as shown in the following figure
In later maintenance and modification, carelessly missing an angle bracket, or the beginning and closing of a label does not correspond, will lead to the DOM structure confusion o ...
Posted by youropensource on Tue, 11 Jun 2019 14:51:16 -0700
SignalR Learning Series 3. SignalR Real-time High Refresh Rate Program
Create a project
Create an empty Web project, and add SignalR, jQuery UI package to Nuget, and include jQuery, jQuery.UI, and ignalR scripts in the future project.
Creating Basic Applications
Add a SignalR Hub class and name it MoveShapeHub to update the code.
using Microsoft.AspNet.SignalR;
using Newtonsoft.Json;
namespace Sig ...
Posted by iBuddy on Tue, 11 Jun 2019 14:48:04 -0700