The main method of the rem layout adaptation scheme is: dynamically calculate and set the font-size of the HTML root tag according to the ratio of the design draft to the width of the device; in CSS, the width, height, relative position, etc. of the desig
Preface I have been working on an H5 chat project recently, and I have encountered one of the biggest pitfalls: the input box gets focus, the soft keyboard pops up, and the input box is required to be adsorbed (or pushed) on the input method box. The requ
After our app development is completed, it is inevitable that the product will be upgraded in the future, so we hope that the app will be automatically upgraded on the customer's mobile phone, which can be divided into automatic upgrade and manual upg
1. Introduction to is_numberic function. Some domestic CMS programs have used is_numberic function. Let's first look at the structure of this function. Bool is_numeric (mixed $var) If var is a number and a numeric string, it will return TRUE, otherwis
Common getElementById, getElementsByName, getElementsByTagName. But foreigners were not satisfied with these APIs, so they created getElementsByClassName, and later a jQuery selector appeared little by little, here only
As you may know, the execution environment of the Javascript language is "single thread". The so-called "single thread" means that one task can only be completed at a time. If there are multiple tasks, you must queue up, complete the p
Anyway, as long as the refresh fails to reproduce after a JavaScript error, the user can solve the problem by refreshing, and the browser will not crash, and it will be fine if it has not happened. This assumption was true before the Single Page App becam
This article introduces the video green screen cutout of canvas pixel point operation and shares it with everyone. The details are as follows: Usage: context.putImageData(imgData, x, y, dX, dY, dWidth, dHeight); Parameter description imgData stipulates th
The way to make such judgments directly in mysql is to use row_count(), which is followed by the SQL statement you execute. Nodejs' i/o is asynchronous, so this creates a problem, which is not easy to judge Which sentence row_count() is the result of
The HTML form is used to collect different types of user input HTML forms to collect user input; Form element defines the HTML form.<form> FORM ELEMENTS</form> Action attributes ACTION Definition The action performed when submitting the form. Server
This article provides three ways to uncheck radio. The code examples are as follows: This article relies on jQuery. The first and second methods are implemented using jQuery, and the third method is implemented based on JS and DOM. Copy the code code as f
1. Methods of Defining Regular Expressions There are two ways to define regular expressions: constructor definition and regular expression direct quantity definition. For example: the code copy is as follows: var reg1 = new RegExp('/d{5, 11}'); //