Tag:js

  • A simple example of implementing Ajax with JS and JSON

    Time:2019-10-27

    preparation in advance 1. Install wampserver or other similar software to build the local integrated installation environment. I installed phpstudy.2. HTML, JS, CSS and other files need to be placed in the WWW directory of PHP study, and the index page runs by default. 3、bootstrap.css Screenshot of interface: Phpstudy is very convenient to use. If […]

  • Teach you to remember JS regular expressions easily

    Time:2019-10-22

    (recommended) JS regular knowledge point topic: / / www.jb51.net/article/139831.htm Preface Regular expression describes a pattern of string matching, which can be used to check whether a string contains a certain seed string, replace the matched substring, or extract the substring that meets a certain condition from a string. Regular expressions are text patterns that consist […]

  • Some common functional programming terms in JS

    Time:2019-10-19

    Composition Combine two elements of a type (including functions) to generate a new element of that type: JavaScript let compose = (f, g) => a => f(g(a)) let toUpperCase = x => x.toUpperCase() let exclaim = x => x + ‘!’ let shout = compose(exclaim, toUpperCase); shout(“hello world”) // HELLO WORLD! Partial application For a […]

  • PHP combined with bootstrap and JS to realize the function of deleting, editing and searching student list

    Time:2019-10-17

    This small project of our own will come to an end. There may be many more bugs. Excuse me Delete student function PHP: //Here is the URL from the front-end code HTML, which is obtained by $_get (see the home page for relevant HTML code and the previous blogs) If (empty ($_get [‘num ‘]) exit […]

  • Some common regular expressions in JavaScript (recommended)

    Time:2019-10-16

    Regular expression describes a pattern of string matching, which can be used to check whether a string contains a certain seed string, replace the matched substring, or extract the substring that meets a certain condition from a string. var validateRegExp = { decmal: “^([+-]?)\\d*\\.\\d+$”, // floating point number decmal1: “^[1-9]\\d*.\\d*|0.\\d*[1-9]\\d*$”, //Positive floating point decmal2: “^-([1-9]\\d*.\\d*|0.\\d*[1-9]\\d*)$”, […]

  • JS Regular Expression Matching Detection for Various Numeric Types (Digital Verification)

    Time:2019-10-15

    Verify the regular expression set of numbers Verification Number: ^[0-9]*$ Verify n digits: ^ \ D {n}$ Verify at least n digits: ^ \ D {n,}$ Verify the number of M-N bits: ^ D {m, n}$ Verify zero and non-zero digits: ^ (0| [1-9] [0-9] *)$ Verify a positive real number with two decimal places: […]

  • Examples of PHP Observer Patterns [Comparing JS Observer Patterns]

    Time:2019-10-14

    This article illustrates the PHP observer pattern with examples. Share for your reference, as follows: 1. Implementing Observer Mode with JS <!DOCTYPE html> <html> <head> <title></title> <style type=”text/css”> div{width: 100px;height: 100px;border: 1px #999 solid;margin-bottom: 5px;} </style> </head> <body> <!– We let the div object observe the change of select, and the change of select will […]

  • Javascript uses regular authentication ID numbers (simple)

    Time:2019-10-13

    Identity cards are 15 or 18 digits, 15 digits are all digits, the first 17 digits of 18 digits are digits, and the last one is digits or capital letters “X”. A matching regular expression: (^\d{15}$)|(^\d{17}([0-9]|X)$) The following is illustrated with Javascript as an example: functionisIdCardNo(num) { num = num.toUpperCase(); // The ID card number […]

  • Method Analysis of Loading CSS and JS Files in Yii2 Framework

    Time:2019-10-8

    This paper illustrates the method of loading CSS and JS files by Yii2 framework. Share for your reference, as follows: 1. The first step is to put our CSS and JS files in the web directory. Step 2: Modify the assets/AppAsset.php file <?php /** * @link http://www.yiiframework.com/ * @copyright Copyright (c) 2008 Yii Software LLC […]

  • Implementing Calendar Effect with JavaScript

    Time:2019-10-7

    In this paper, we share the specific code of JS to achieve calendar effect for your reference. The details are as follows. <!doctype html> <html> <head> <meta charset=”gb2312″> < title > perpetual calendar </title > <script type=”text/javascript”> var lunarInfo = new Array( 0x04bd8, 0x04ae0, 0x0a570, 0x054d5, 0x0d260, 0x0d950, 0x16554, 0x056a0, 0x09ad0, 0x055d2, 0x04ae0, 0x0a5b6, 0x0a4d0, […]

  • JavaScript Operations Form Power Node Java Academy collation

    Time:2019-9-30

    Operating a form with JavaScript is similar to operating a DOM, because the form itself is also a DOM tree. However, input boxes, drop-down boxes and so on can receive user input, so using JavaScript to manipulate the form can obtain user input content, or set a new content to an input box. The input […]

  • Summary of String Array Reduplication Function Implemented by JS

    Time:2019-9-28

    In this paper, an example is given to illustrate the string array de-duplication function implemented by JS. Share for your reference, as follows: Here we only consider the simplest string array to be de-duplicated, not to mention the object, function, NaN and so on. This kind of regular implementation is not satisfying. Irregular implementation: ES6 […]