JavaScript truncates an array by setting the length attribute of the array. It is the only method to shorten the length of the array. if you use the delete operator to delete elements in an array, although the element becomes undefined, The length
In js, everything is an object, and functions are the same. For function writing, you can use the last parameter as the method body. Or
Var add = function (num, num1)
{
}
Function add (num, num1)
{
}
Each method has an implicit arguments
The cross-browser event processing function binding provided in the previous JS interview question cross-browser event processing function binding lacks cross-browser processing for event objects. Complete it here.
In a DOM-compatible browser.
I. Event bubbling
1.1 Different Phases of events
Javascript events are executed in two phases: capture and bubbling.
For example, if the link to the anchor #1.1 in the Dom structure is clicked, the Click processing function of document> body> ul>
This section is a bit interested in js. It is interesting to have a few small js experiments. One of them is to control the display of the clock. If you are interested, you can study it! Let's take a look at the following code:
First, declare
Java codeStyle = "width: 200px;">AllThe strfgs value is spelled out by thisJava codeFor (int I = 0; I List fgslist = (List) listzrbm. get (I );String des = fgslist. get (1). toString ();If (fgsmc! = Null & des. equals (fgsmc )){Fgs = fgs + "+ "\"
Java codeVar abc; Alert (abc); // output undefined directly to indicate that the variable is not initialized.Alert (abc = undefined) // Output true here Var jeo = undefined;Alert (jeo); // undefined is also output here, which indicates that if
This tree is implemented using the zTree plug-in! The Code is as follows:Page code:Jsp codeString path = request. getContextPath ();String basePath = request. getScheme () + ": //" + request. getServerName () + ":" + request. getServerPort () + path
In IE, the default div size is at least 15px. If the div height is set to smaller than 15px, for example, 1px, no effect is found. This is to set font-size: 0px; line-height: 1px;Java code
Author "roc08"
Javascript defines objects in six ways:1.1 add attributes to an existing object Http://www.w3.org/TR/html4/loose.dtd> New Web Project 1.2 create objects in factory Mode How to share a function object with multiple objects, instead of having one
JQuery uses the $ symbol as an introduction to jQuery.Some other functions in the JavaScript Library (such as Prototype) also use the $ symbol.JQuery uses noConflict () to solve this problem.Var jq = jQuery. noConflict () helps you replace the $
Originally, I wanted to display a GIF image by clicking the search button. I accidentally saw this code, and I felt that the result was quite good.Code implementation: move the mouse to the name (wait.gif) to display the image. Move the mouse away
Recently I read Kimi's code and found a lot worth learning. In this article, I wrote the method parameter implementation in Js. Keywords: eval_r ()
Example:
01
02
03
04
Page Show: 77
05
06
23
24
From: tommmy blog
Encapsulation: by declaring a method or attribute as private, you can keep the implementation details of the object confidential to other objects to reduce the coupling between objects, the data can be guaranteed and the modification method can be
Since the birth of jQuery, there have been more and more versions, and the new versions on the jQuery official website are still being updated and released, and have now reached version 1.6.4, however, we have used the old version of jQuery in
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.