Three common binding event methods in JS

In the study of JavaScript, we often encounter the event mechanism of JavaScript, such as event binding, event listening, event delegation (event agent), etc. What do these nouns mean and what are their functions? Event binding To make JavaScript respond to user actions, you first bind event handle ...

Posted by theycallmepj on Tue, 17 Mar 2020 02:55:45 -0700

Front and Back End Key Allocation Verification

Each time this page is opened, the backend generates a certificate based on Session if(!isset($_SESSION['key_pub'])){ $rsa_model=new \Home\Library\Org\Util\Rsa(); $_SESSION['key_pub']=$rsa_model->privateKey; $_SESSION['key_pri']=$rsa_model->privateKey; } $this->assign("pub_token",$_SESSION['key_pub' ...

Posted by synapp2 on Sat, 14 Mar 2020 09:33:32 -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

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

Front end learning - carousel chart case

Article directory Preface Import jQuery function library Rotation chart requirement analysis Realization css html Development process html framework development Style development Dynamic page generation summary Preface Last article: Front end learning (3) - jQuery function library The last ...

Posted by skissiks on Tue, 03 Mar 2020 20:58:21 -0800

The method of detecting data type and encapsulating a general method in JS

Test data type 1: typeof   The returned results are all strings, including the corresponding data type "number"/"string"/"boolean"/"undefined"/"symbol"/"object"/"function"; Limitation: when null is detected, the returned result is "object". When other special object ...

Posted by LostOne on Tue, 03 Mar 2020 01:04:13 -0800

Can key events be simulated by programming?

Can key events be simulated programmatically in JavaScript? #1 building Non jquery versions that can be used in both webkit and gecko: var keyboardEvent = document.createEvent("KeyboardEvent"); var initMethod = typeof keyboardEvent.initKeyboardEvent !== 'undefined' ? "initKeyboardEvent" : "initKeyEvent"; keyboardEvent[initMethod]( "k ...

Posted by swamp on Mon, 02 Mar 2020 23:15:41 -0800

Dynamic filling data into HTML page through js

Under normal circumstances, it's more convenient to complete the function in JSP page. Compared with JSP page, it's more convenient to use, and there will be special circumstances. HTML page is needed to display the data, and the data needs to be acquired and displayed dynamically, so js method is us ...

Posted by nashyboy on Mon, 02 Mar 2020 21:48:54 -0800

JavaScript uses the alert() function in jQuery $("ා). Blur() to cause infinite cycles to lose focus and execute the pop-up warning solution

Problem analysis of this record: 1. Time difference problem: When I click alert, I clear and focus the input box, but the moment I click alert, the focus is not on the input box, and the defocus event is triggered, resulting in the alert pop-up. 2. Sequence question: With the mentality of first letting it pop up in the execution of clearing and ...

Posted by BDabrowski on Wed, 26 Feb 2020 20:46:34 -0800

The use of echarts report technology

1, Introduction to echarts It is an open-source visualization library implemented by JavaScript, which can run smoothly on PC and mobile devices, and is compatible with most current browsers (IE8/9/10/11, Chrome, Firefox, Safari, etc.), the bottom layer relies on vector graphics library ZRender, providi ...

Posted by installer69 on Wed, 26 Feb 2020 19:22:28 -0800