(This does not mean that jQuery has excellent performance. On the contrary, it can only be said that it is a relatively closed library and cannot be optimized by external intervention ). This article records a failed optimization
However, prototype is used in the script. in the process of js, we found that some methods are rarely used, but some methods seem to be classic. The script library is constantly increasing... continue to get started with JS and learn about Array
There are few methods provided by the Date class in ExtJs. However, on the other hand, due to historical reasons, there are many letters describing the format variables of Date in any language. This section describes the Date format representation.
Let's take a look at an example:Copy codeThe Code is as follows:Var Class = {Create: function (){Return function (){This. initialize. apply (this, arguments );}}}Var A = Class. create ();A. prototype = {Initialize: function (){// Todo}Test:
Differences between textContent and innerTextIE has an innerText attribute, and FF has a textContent attribute. Many of the scripts previously written to IE cannot find the innerText attribute under FF. Therefore, we recommend that you use
JavaScript to get the current timestamp:Method 1:Copy codeThe Code is as follows:Var timestamp = Date. parse (new Date ()); Result: 1280977330000Method 2:Copy codeThe Code is as follows:Var timestamp = (new Date (). valueOf (); Result:
In Extjs, after a new row of data is created on the grid page of the current page, the detailed page is edited in the form. In this case, in order to enable the page to automatically open the detailed page editing, it took me three hours to finally
Slides (often referred to as "content slide", Content Switching effects, focus charts, etc.) are a good way to display a large amount of content in a small area of a website or blog. Dynamic Auto-sliding content is popular on many websites. Are you
Here is the js Code:Copy codeThe Code is as follows:JQuery. fn. size = function (){Return jQuery (this). get (0). options. length;}// Obtain the index of the selected itemJQuery. fn. getSelectedIndex = function (){Return jQuery (this). get (0).
There are three types of objects in JavaScript:1. Internal objectSuch as Array, Boolean, Data, Math, Number, Object, RegExp, String Object, etc.These object systems provide us with their respective attributes and methods for calling.2. class-based
The difference is that fly returns the lightweight Element, which occupies less memory, but does not save the object reference. Every time it is used, the previous object is changed, and get caches the Element object returned each time, however, it
To implement the Editable table function, we need to solve the following problems:1. Identify the columns of the data to be modified in the table (how to find these cells );2. How to make cells editable;3. How to handle some cell button events;4.
Var a = '20140901 ';Alert (parseInt (a, 2); // convert 111 as a binary value. Ignore 60 (not binary) and convert from left to right only binary values.Alert (parseInt (a, 16); // convert allAccording to this method, it can be converted to any
To put it simply, the jQuery validation plug-in is used to verify whether the content entered by elements in the form meets the business rules. If not, it can provide user-defined prompts. This plug-in not only has some verification rules by default,
The first and most common is to register an event directly in the html Tag by specifying the HTML attribute with the same name as the event handler. The Code is as follows:Copy codeThe Code is as follows:Function eventHandler (){Alert ("the current
Copy codeThe Code is as follows:// Convert a Date string such as "10:18:30" to a Date objectVar strArray = str. split ("");Var strDate = strArray [0]. split ("-");Var strTime = strArray [1]. split (":");Var a = new Date (strDate [0], (strDate
3.1 Basic Data Types1. string type (string): it consists of unicode characters, numbers, and punctuation marks. In javascript, there is no char character type. A string must be used even if it only represents one character.2. number: the integer and
I have posted some learning achievements here, hoping to help others who want to learn JQuery and record their learning status.After reading some official JQuery tutorials, I was a little overwhelmed and decided to write something on my own. I saw a
First, check all the complete code: countDown test end date [Ctrl + A select all Note: If you need to introduce external Js, You need to refresh it to execute]Some html code:You can enter the countdown time in the text box. If the
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service