Recently I worked on a webapp project, which is a hybrid development, with external native and internal webview nested H5 pages. The front-end is developed using vue, and the adaptation is made by flexible+rem. Everything was fine originally, but the lead
When the mobile browser scrolls the current page (and may also be zooming the page), the default behavior is blocked, causing the page to be forced to remain still, resulting in a poor user experience and a sense of pause when scrolling the page. A more s
Event response refresh: Refresh only when there is a request 1. Obtain HTML elements through JS HTML DOM or jQuery, monitor page events through DOM methods or jQuery methods, and obtain user requests; 2. Submit user requests to the server through Ajax, an
When it comes to HTML5, people always talk about it. There are so many features and interesting APIs that are refreshing. However, many children's shoes still stay at the semantic stage and ignore the power of HTML5. In this section we will discuss mu
Preface: I recently worked on an app project using apicloud to achieve cross-platform development. Now I need to add gesture (nine-square grid) unlocking function to this app. apicloud already has some third-party natively implemented gesture unlocking pl
It comes from thinking about a written test question. Normally, no one will modify the parameter value inside the function. It is only discussed here. There are three ways to modify it. 1. Directly modify the formal parameter copy code when declaring the
The JavaScript mentioned here refers to the browser environment including the host environment. The first is the ECMAScript Global Object, and the second is the global object/function under the host environment (Host). 1. Core JavaScript built-in objects,
Function.prototype's apply and call were only added in ECMA262 Edition3 released in 1999 (ECMA262 Edition2 was released in 1998). There is no ap in previous browsers such as IE5.01 (JScript 5.0)
Each function has a prototype attribute, called the prototype. Each object also has a prototype, which can be accessed through __proto__ in Firefox/Safari/Chrome/Opera. There is no relevant interface provided in IE6/7/8. Copy the code code as follows: fun
This article mainly introduces a way to achieve canvas scaling by setting the canvas's transformation matrix. The first step is to listen to the mouse wheel event. In the wheel event, based on the scrolling of the mouse and the previous transformation
Prototype requirements: It is required to make an invitation card page, in which the number of words in the title is dynamic and can display up to 2 lines. If it exceeds 2 lines, an ellipsis will be added at the end of the second line of content. Accordin
Copy the code as follows: //Amount format conversion function parsePrice(s) { var n = 2 //Set the number of retained decimal places s = parseFloat((s + "").replace(/[^/d/.-] /g, "")).toFi