Today, I encountered a compatibility problem when using innerText. FireFox does not support the innerText method. I checked the MDN and found that there is a similar method named textContent in FireFox, which is similar to the innerText in IE, is
For example, traverse the following one-dimensional array:
Copy codeThe Code is as follows:[Javascript] view plaincopyprint?Var a1 = [1];Var a2 = [1, 2];Var a3 = [1, 2, 3];
Although they have different lengths, it is very easy and elegant to deal
Copy codeThe Code is as follows: untitled document
JQ version CSS version If you copy and run the above Code. You will find that. The first block in IE6 is transparent.
I don't know how it works. It should be that JQuery has already considered
1. The toggle () methodYou can call N specified functions in sequence until the last function is called again. The syntax is as follows: toggle (fn, fn2, [fn3, fn4,...]), the fn, fn2, fn3, fn4, and other functions are called in sequence.
2. Sample
1. When a user browses the pageThe browser will interpret or compile the Page code. This process is essentially driven by events, that is, when the page is loaded, a Load event is executed, compile the Page code in the browser. After an event is
This article will share with you eight exquisite jQuery image playback plug-ins. Each plug-in provides demos and source code downloads. If you are interested, you can download and use it. Let's talk about these plug-ins.
1. 3D carousel album
This 3D
Let's talk about this application scenario first.:Read data from the XML file, and then return the data to the page using a third-party plug-in for plotting.The data read in XML is of course a string type, and if you want to use the time mode of the
Javascript code Copy codeThe Code is as follows:// Determine whether there are unsaved input values when you leave the pageVar hasSaved = false; // whether the flag is not saved for the input content. The initial value is false.Function CheckUnsave (
It is often necessary to use numeric input that limits the text box. I have tried many methods and it is not ideal. I decided to implement it myself.Methods Used The onkeydown event is used to control only allowed numbers:Copy codeThe Code is as
An example of imitating the title attribute of a implemented by jQuery. During the test, the levels of ie6 and 7 were disordered, but the final solution was solved.The html code is as follows::Copy codeThe Code is as follows: UI Designer
Jquery code Copy codeThe Code is as follows:$ ("# BankAccountNumber"). change (function (){Alert ("1 ");Var account = $ ("channelForm. bankAccount. account"). val ();Alert ("2 ");Var reg =/^ \ d {19} $/g; // starts with a 19-digit number and ends
By default, Panel, Window, and other components of Extjs contain borders. Normally, it is irrelevant to use them independently, however, when Panel is used as a child component of the Window component, a double border occurs. If the Window component
Jquery returns the DIV width.:Copy codeThe Code is as follows:$ ("# Keleyi_com"). width ();Keleyi_com is the id of the DIV. Complete sample code:Copy codeThe Code is as follows: jquery obtains the width (width) of the DIV-ke leyi the id of this DIV
The serialize module of jQuery has a r20 regular expression.Copy codeThe Code is as follows:Var r20 =/% 20/g, JQuery. in the param method, all "% 20" is converted to "+", that is, if the data contains spaces before the data is submitted, the space
We can define a code called by js in the Copy codeThe Code is as follows: OK. This means that when you click the button, you can trace the content of commentTemplate to comment_ul_2. This is very interesting!There is a replace, which is also very
A few days ago, when I saw an article in the garden that float your blog with snow, I quickly got my blog to see the effect. Don't say it's pretty. But after reading it for a while, we found that the page became special.After reading the code, I
Copy codeThe Code is as follows: Example: The fuzzy search of ztree is used here. At the beginning, all Tree nodes are closed. However, if you enter the search content for a query, after expanding the parent node of the query content, the focus in
Function: zhou en ce recently wrote a jquery-based Information pop-up plug-in named showInfoDialog, which masks the background and then displays the information display box. The information display types include:
1. Description of information types:
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