For example.Copy codeThe Code is as follows:For (I = 0; I Alert (I );} However, this is really not a good habit. Next I will explain why var must be added to the Js for loop, otherwise it will bring you annoying and difficult to query bugs from time
I remember that when I wrote a static page in that year, different styles were added to each page for highlighting. highlighted display I think it is quite common for the web Front-end. This is exactly what I want to use. I specially sorted out the
1. Go to the "Management> Configuration" panel.2. In the "customize page style through CSS" text box, add:Copy codeThe Code is as follows:/*********** Tag cloud css ****************/# TagCloud {Text-align: center;Overflow: hidden;}# TagCloud
1. When JAVASCRIPT is referenced, the character languages used are inconsistent.For example, . xxx. js file is used inside the GB2312 format, calling outside is used UTF-8, so some special characters inside the file because of inconsistent formats,
The following describes a method. Basically, the structure and behavior are separated, and only one connection is required.It is easy to use, and the same js Code can achieve the effects of multiple scrolling graphs on this page without mutual
The Code is as follows:Copy codeThe Code is as follows:Var br = {};Br. eventRouter = {};Br. eventRouter. addListen = function (el, eventType, func ){If (! El. eventObjs ){El. eventObjs = {};}If (! El. eventObjs [eventType]) {El. eventObjs [eventType]
Function Code:Copy codeThe Code is as follows:'Filtering array repeated function name: array_no (cxstr1, cxstr2, cxstr3)'Cxstr1: any string, automatically recognized'Cxstr2: delimiter in cxstr1.'Cxstr3: string at a certain position in the extraction
Example:Copy codeThe Code is as follows: JOHN Li Si // Obtain the selected option value$ ('# SltList'). val ()// Obtain the text of the selected item$ ('# SltList option [@ selected]'). text (); // obtain the currently selected option. text is text,
For example, there is an employee object,Copy codeThe Code is as follows:Function employee (){This. e_id = 0;This. e_name = "";} Now we need to dynamically add the "age" attribute and "toString ()" method for it,Copy codeThe Code is as follows:Var
Shows the effect:After reading the example, I wrote it myself (just give myself an encouragement !)Jquery Copy codeThe Code is as follows:$ (Document). ready (function (){Var h3 = $ (". accordion h3 ");$ (". Accordion h3: eq (0)"). addClass ("active"
Function:Copy codeThe Code is as follows:Function throttle (fn, MS ){Var last = (new Date (). getTime ();Return (function (){Var now = (new Date (). getTime ();If (now-last> MS ){Last = now;Fn. apply (this, arguments );}});} Fn: Input
Some time ago, I used it in my work. I pasted the code and only kept the relevant code. I found that there were very few codes.Upload page html/jsCopy codeThe Code is as follows: Process File Upload c #Copy codeThe Code is as follows:If (context.
When jQuery's ajax method is called, jQuery will serialize the parameter data based on the post or get protocol;If the submitted data uses complex json data, for example:{UserId: 32323, userName: {firstName: "Li", lastName: ""}}The server cannot
So with this: untitled document name progresstudy age 22 occupation Student [Ctrl + A select all Note: If you need to introduce external Js, You need to refresh it to execute]This method is written in a way similar to
The effect is as follows:
The solution to this problem is to specify the error information to a specific location. The parameters of the validate () method can be customized. The sample code is as follows:Copy codeThe Code is as follows: Gender
I used to manually bind the event handler when I added it. However, this function has been added to the new jquery version. We don't need to worry about it anymore.Reference: http://api.jquery.com/live/Previously, we defined events. For example, we
Http://jialiren.sinaapp.com/jdt/:The Html code is as follows:Copy codeThe Code is as follows: progress bar NO. progress bar progress remarks Other 1 20 20 the progress is too slow Work 1 2 30 30 fuel Task 2 3 80
You can test your knowledge in this area.After the question is answered, I will refer to the original blog post and comment on the question analysis, and everyone is competing.The quiz:1:1 & 32:1 & "foo" | 03:1 | "foo" & 04:(1, 2, 3)5:X = {shift: [].
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.