Tag:js

  • JS realizes the function example of iPhone like webpage sliding screen unlocking [Download with source code]

    Time:2020-1-21

    The example of this paper describes how JS can realize the function of page slide screen unlocking similar to iPhone. To share with you for your reference, as follows: The emergence of iPhone breaks people’s user experience, which extends to web design. Recently, I saw a lot of blog comments are implemented in the way […]

  • 12 common JS regular expressions

    Time:2020-1-21

    In this article, I have written 12 super useful regular expressions, which are the favorite of web developers. 1. In the input box, you can only enter the amount, in fact, you can only enter a number with two decimal places at most //The first is limited in the input input field < input type […]

  • JS regular expression learning notes

    Time:2020-1-15

    Regular expression:Search, replace and extract the information in the string. (comments and blanks are not supported and must be written in one line) Regular expression creation:Characters contained between a pair of slashes (direct quantity syntax)For example: Var pattern = / S $/; // create a regular to match all strings ending in the letter S […]

  • Detailed explanation of common functions of JS regular expression

    Time:2020-1-14

    1、 JS regular expression‘s replace function usage: Function functions:The replace function returns a copy of a string after a literal replacement based on a regular expression. Function format:stringObj.replace(rgExp, replaceText) Parameters:String obj, rgexp regular expression, replacetextThe content of this module includes string creation, regular expression implicitly creating objects, creating regular expressions, and matching replacement methodsExample code: […]

  • JS regular expression common function explanation (Continued)

    Time:2020-1-13

    Methods of regular expression objects 1、test,Returns a Boolean value indicating whether a pattern exists in the string being looked up. Returns true if it exists, false otherwise. 2、exec,Runs a lookup in a string in regular expression mode and returns an array containing the result of the lookup. 3、compile,The regular expression is compiled into an internal […]

  • Learning regular expressions (JS, c)

    Time:2020-1-11

    Using regular expressions in JS function myValid() { var errorMsg = “”; var res = true; //Get the value to verify Var receivename = $(“#receivename”). Val(); // name Var receivemobile = $(“ාtmobile”). Val(); // mobile number Var validcode = $(“#validcode”). Val(); // verification code Var regname = / ^ [\ u4e00 – \ u9fa5] {2,4} […]

  • A code of downloading progress bar and playing progress bar in JS

    Time:2020-1-8

    It’s not too difficult technically. What’s the difficulty is how to make the whole animation smooth. One of the main problems is the lag of animation: when the download progress reaches a certain point, you use 250ms of animation to transition to the past, which is already slow, so many people may not do animation […]

  • Base 64 coding and decoding implemented by JS

    Time:2019-12-24

    Base64 is a representation of binary data based on 64 printable characters. Since the 6th power of 2 is equal to 64, every 6 bits is a unit, corresponding to a printable character. Base64 is often used to represent, transfer and store some binary data when dealing with text data. Including mime email, email via […]

  • Key points of JavaScript querying data in mongodb by date

    Time:2019-12-23

    Group by date aggregate query date statistics daily data (amount of information) 1  { “_id” : ObjectId(“557ac1e2153c43c320393d9d”), “msgType” : “text”, “sendTime” : ISODate(“2015-06-12T11:26:26.000Z”) }   2  { “_id” : ObjectId(“557ac1ee153c43c320393d9e”), “msgType” : “text”, “sendTime” : ISODate(“2015-06-12T11:26:38.000Z”) }   3  { “_id” : ObjectId(“557ac2012de5d32d213963b5”), “msgType” : “text”, “sendTime” : ISODate(“2015-06-12T11:26:56.000Z”) }   4   { “_id” : […]

  • JS implementation Click to generate UUID method complete example [based on jQuery]

    Time:2019-12-14

    The example of this paper describes the method of generating UUID by clicking in JS. To share with you for your reference, as follows: <!DOCTYPE html> <html lang=”en”> <head> <meta charset=”UTF-8″> < title > www.jb51.net method instance of generating UUID with JS < / Title > <script src=”http://libs.baidu.com/jquery/2.0.0/jquery.min.js”></script> <script> var id = getUuid(); $(document).ready(function() { […]

  • JS uses cookies to remember user names

    Time:2019-12-8

    The example of this article describes how JS uses cookies to remember user names. To share with you for your reference, as follows: <!DOCTYPE html> <html> <head> <meta charset=”utf-8″> <meta http-equiv=”X-UA-Compatible” content=”IE=edge,chrome=1″> < title > www.jb51.net cookie remember user name < / Title > <meta name=”description” content=””> <meta name=”keywords” content=””> </head> <body> <script> //1. Use […]

  • PHP VBS JS function comparison table

    Time:2019-11-27

    For various languages, functions and definition methods, you can distinguish them and use later learning applications.Due to limited space, full address:http://demo.jb51.net/chengxu/aspphpjs.html