Using javascript to complete magnifier effect
Using javascript to complete magnifier
1. Complete the css layout. The layout can be written according to personal preferences
2. Using the object-oriented idea, the first step is to click events for small pictures. You can use event delegation to judge objects, or you can use array to add click events ...
Posted by adamriley on Sat, 14 Mar 2020 05:29:04 -0700
WebView should know and should know
Catalog
1, What is WebView? What can WebView do?
2, Play WebView
Commonly used API
Basic use
1. Add network permission
2. Instantiate WebView
3. Set up WebClient
4. Set up WebChromeClient
5. How to interact with JS
Web pages jump to other applications through Scheme
1. What is scheme?
2. If the w ...
Posted by Robert Elsdon on Fri, 13 Mar 2020 23:27:21 -0700
JavaScript warning (alert message dialog)
1 alert (string or variable);
When we visit the website, we sometimes pop up a small window with a piece of prompt message written on it. If you don't click "OK", you can't do anything to the web page. This small window is implemented by using alert. The above is the alert() syntax
1 <!DOCTYPE html>
2 <html>
3 ...
Posted by $kevan on Fri, 13 Mar 2020 07:19:01 -0700
The summary of js anti shake and throttle
In recent projects, the test proposed that clicking the button quickly for many times would trigger multiple calls of the interface. Later, when querying the data, you can use the anti shake optimization, which just integrates the use of anti shake and throttling for your own learning
Code:
<!DOCTYPE html>
<html>
<head>
...
Posted by shamuraq on Fri, 13 Mar 2020 03:24:07 -0700
Use jQuery for e-mail validation
I'm new to jQuery and want to know how to use it to verify email addresses.
#1st floor
I would recommend Verimail.js And it also has one JQuery Plugin .
Why?Verimail supports the following:
Syntax validation (according to RFC 822)
IANA TLD Validation
Spelling suggestions for the most common TLD and e-mail domains
Deny ...
Posted by sfullman on Thu, 12 Mar 2020 19:33:35 -0700
Node.js common tools
util is a core module of Node.js, which provides a collection of common functions to make up for the lack of too simplified functions of core JavaScript.
The method of use is as follows:
const util=require("util");//Introduce util Modular
//Define an asynchronous function
async function fn(){
return "hello cyy~";
}
//Turn asynchronous fu ...
Posted by mcguinkc on Wed, 11 Mar 2020 00:55:31 -0700
H5 develops the mobile page. After the detail page returns to the list page, the page refresh fails to locate the original location. The problem is solved
1, Problem Description:
1. In the development of mobile terminal, the list page is generally used to add the content of the next page to the end of the current list page to realize the paging function. When sliding down to a page, click a piece of information to enter the details page, and then click the return of the details page to return to ...
Posted by Shaped on Tue, 10 Mar 2020 02:19:27 -0700
CSRF (Cross Site Request Forgery) Cross Site Request Forgery
0. Preface
CRSF is based on session, which sounds like XSS cross site scripting attack, but in fact, the attack mode is totally different. When I wrote XSS, I mentioned that many websites would use cookie s to save the login information of users. For example, when I finished using CSDN last night, I c ...
Posted by Kryllster on Mon, 09 Mar 2020 22:06:02 -0700
4: Front and back interaction of Vue
1: Overview
1 interface call mode
Native ajax
ajax based on jQuery
fetch
axios
2: Traditional URL
Format: Schema: / / lost: port / path? Query fragment
1):schema: protocol. For example, http,https,ftp, etc
2);host: domain name or IP address
3):port: port, http default port 80, can be omitted
...
Posted by viveleroi0 on Mon, 09 Mar 2020 21:59:10 -0700
Node.js buffer
JavaScript language has only string data type and no binary data type.
But binary data must be used when processing streams such as TCP or file streams.
Therefore, in Node.js, a Buffer class is defined, which is used to create a special Buffer for storing binary data.
Before v6.0, the new Buffer() constructor is used to create the object inst ...
Posted by gregor171 on Mon, 09 Mar 2020 00:08:14 -0700