The three pages are separated into main.htm, left.htm, and right.htm in the same window.Main.htmCopy codeThe Code is as follows: implementation across Main Window Left.htmCopy codeThe Code is as follows: left I am on the left Right.htmCopy
First, when a jQuery event is bound, all events are stored in $. cache using the $. data ('events') method. You can obtain them repeatedly:Copy codeThe Code is as follows:Var $ div =$ ('div. demo'), data = $ div. data ();// Obtain all binding events:
Here is a part that is easy to understand for beginners of jQuery. I have listed these methods here and hope you can understand them. As follows:
Method
Source package set/string
Target package Group
Feature description
A.
Copy codeThe Code is as follows: Number of random numbers Maximum random number regenerate Time elapsed (MS): bubble sort select sort insert sort shell sorting quick sorting (recursion) quick sorting (stack) merge and sort heap
I. Basic selector:
# Id: select the element with the given ID name, for example, $ ("# id1") as the element with the id set to id1.
. Class: select the element of the given class name
Element: Selects all primary colors of a given element name.
Functions:1. Sorting function: Click the row header or list header to sort in the forward direction. If you click it again, the reverse order is performed;2. Modify function: Double-click a cell to perform the input operation. When the input box
Copy codeThe Code is as follows:$. Fn. serializeObject = function (){Var o = {};Var a = this. serializeArray ();$. Each (a, function (){If (o [this. name]) {If (! O [this. name]. push ){O [this. name] = [o [this. name];}O [this. name]. push (this.
First:Copy codeThe Code is as follows: Second:Copy codeThe Code is as follows: Third:Copy codeThe Code is as follows: Fourth:Copy codeThe Code is as follows: Category 5:Copy codeThe Code is as follows: Type 6: The URL is obtained and switched from
Var Class = {Create: function (){Return function (){This. initialize. apply (this, arguments );}}}Defines a class function as a template or prototype for creating a class.UsageCopy codeThe Code is as follows: Test Class. create () ; ////This is
javascripttest January February March April May June December [Ctrl + A select all Note: If you need to introduce external Js, You need to refresh it to execute]
Next, other methods:1. You can also judge in the onreadystatechange event in IE.Http://www.thefutureoftheweb.com/blog/adddomloadeventHere, Jesse Skinner writes an independent Script Function to solve the onload problem of various browsers
$ A method:Accepts an array-like collection (anything with numeric indices) and returns its equivalent as an actual Array object. this method is a convenience alias of Array. from, but is the preferred way of casting to an Array.Copy codeThe Code is
So, I need a method escape. I searched the internet and wrote a regular expression replacement for most of them. However, my habit is to respect existing resources. Someone suggested the dom function. Pass it as innerTEXT to a dom object, and then
Copy codeThe Code is as follows:/*** Get the length of Chinese and English characters* @ Param {} str* @ Return {}*/Function LengthB (str ){Var p1 = new RegExp ('% u ..', 'G ')Var p2 = new RegExp ('%.', 'G ')Return escape (str). replace (p1, '').
The following code uses js to search for the span tag under the specified id without adding any characters, and matches the date in the format of 05-27, you can modify the date type slightly.Note that the matching is the current date. All users only
I can't talk about the translation of "Xin \ YA \ da". I hope I can make a mistake in the article.
Programming traps (gotcha) refer to unexpected document features in computer systems rather than bugs. these traps keep beginners away from javascript
In the following example, the height of the outer element is 200px, and that of the inner element is 300px. Obviously, the content in the outer element is higher than that in the outer element itself. when a scroll bar is dragged down, some content
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