This version follows the 2.0 syntax. Here, the extend method encapsulates various options to be set, which is simpler than the code of version 2.0. Version 2.0Copy codeThe Code is as follows:// Set the basic information of the plug-inVar options =
Plug-in requirements1. Move the elements in the list to the left or right. (Note: the upper and lower directions are the same. Use css to control the float direction of the list element ~)2. When you move the mouse over an element, change the
1. var count = $ ("ul [@ pid = '5']"). length; if (count = 0); return "no"; return "yes ";// Determine whether the PID on the page UL is 5 or not. Generally, do not use ELSE.2. this. mainUl. find ("li"). mouseover (function (I) {}); // search for
However, in essence, the father of javascript cannot master all of this. The website he supports is not powerful enough to allow competitors to use its products. Microsoft developed a JScript, the dead Macromedia made an ActionScript, and there are
The difference is that setInterval executes code once every specified period of time, which is repetitive. However, setTimeout is called only once.The following describes two functions through function establishment and automatic function deletion;1.
Similar articles have not been posted before.Difference between JavaScript null and undefinedJavaScript Undefined, difference between the Null type and the NaN ValueLet's talk about undefined:The variables in Javascript are of a weak type (I don't
1. Operation attributesThe preceding section describes how to filter required elements. After an element is obtained, perform operations on it. A common requirement is to traverse the obtained Element Set and perform an operation on each element.
Let's look at a piece of JavaScript code nested with two-layer functions:Copy codeThe Code is as follows:Var me = {Name: 'jimbor ',Blog: 'http: // jmedia.cn /',SayMyName: function (){Var pre = 'My name is :';Function displayName (){Alert (pre + this.
If there is a fibonacci series to be calculated:Copy codeThe Code is as follows:Var maid = function (n ){Return n }; I am afraid that a large number of browsers will collapse, because there will be a large number of repeated computations in the
Program codeWindow. onload = function (){...}.To access HTML documents, you must first load the Document Object Model (DOM ). When the window. onload function is executed, it indicates that everything has been loaded, including images and banners.
Copy codeThe Code is as follows:/********************** Js mask progress bar (image)** Dingzh@jstrd.com** 2009-3 3*********************/// Disable Web page withdrawalWindow. history. forward (1 );Document. attachEvent ("onkeydown", docKeyDown
To use ExtJS, you must first obtain the ExtJS library file. The ExtJS library file can be downloaded from the ExtJS official website.
Adapter: maps the third-party underlying libraries (including the underlying libraries provided by Ext) to the
This article uses regular expressions to match strings in location. search. The three main functions are getQueryString (), getQueryStringByName (name), and getQueryStringByIndex (index)
Three main methods:
Method
Description
In retrospect, IE will kill some blank spaces in the front of the tag, and all the labels in the tag will be capitalized. The dynamically added attributes will be displayed. In some elements, it is still read-only. It was chilling to find that this
Copy codeThe Code is as follows:1. Create an object using JSON in javascript Js CodeCopy codeThe Code is as follows:// Create an empty objectVar JSONObject = {}// Create a new objectVar JSONObject = new Object ()// Create an object that contains
The abs method returns the absolute value of a number.The acos method returns the arc cosine of a number.The anchor method adds an HTML anchor with the NAME attribute at both ends of the specified text of the object.The asin method returns the arc
When we want to read some information about the Event, it is often lost in a large number of attributes. Most of these attributes cannot run well in most browsers. The event compatibility list is provided here.I don't plan to give these attributes a
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