But from the overall perspective, this can lead to some situations that are difficult for us to control: the variable with the same name, the transformation of the values of multiple functions that share a global variable ... Wait a minute. So,
There are two ways to check variable types, and here's the explanation:
Check variable type method one: typeof
Format: typeof variable
Usage: if (typeof variable = = "Type id") {...}
The following are the typeof values for some of the common data
JS Object Table Table object (excerpt)
Table Object CollectionTable object: Represents the tables in an HTML document, and the browser creates a Table object for each tag in the document.
Collection
Describe
The event object is valid only if it occurs. Some properties of an event are only meaningful for a particular event. For example, the fromelement and toelement attributes are only meaningful for onmouseover and onmouseout events. The example below
What is the stack area and the pre execution process for which there are no freed resources, explained in one of the most common examples:
For example, now we have a UL, there are a lot of Li, need to traverse them for them to bind the Click event,
With artificial mirror, know the gain and loss, it seems that this sentence is very reasonable.
Demo 1:
If this is a global function, this is the Window object, and the various properties or methods defined in the function can be accessed outside
In IE we can use Sourceindex, standard browser We can use Comparedocumentposition, but for the old point of the standard browser? What about XML? So we need to determine its relationship with another node based on the attributes of one node.
I have
Browsers to ensure proper execution of scripts and rendering layouts completely block the rendering of subsequent content on the page and the loading of other resources before the browser loads and executes it.
In the process of loading the page, if
1th:
Copy Code code as follows:
var lennon=array ();
lennon["name"]= "Windy";
lennon["Year"]= "1989";
lennon["Living"]=true;
alert (lennon.length);
Results: Lennon.length was 0
Reason:
Adding an array element in the following
Question:When IE 7 is popped out of the page, the address bar is always displayed, and the address bar does not want to appear in the program, and it also affects beauty. The address bar does not appear in the IE6.
Solution:
Tool-->internet Option-
The syntax recommended by the consortium is to obtain an element within the DOM tree through the document object, common methods getElementById (), Getelementsbyname (), getElementsByTagName (), Their role is to return a single node or collection of
The following is a summary of URL encoding for variable values: it is recommended that you use encodeURIComponent (), Get and post methods to send the past.
There are several ways to encode URL strings in javascript: Escape (), encodeURI (), and
The preload technology mentioned in this article is mainly to let JavaScript quickly get the size of the image header data.
A typical example of using preload to get the size of a picture:
Copy Code code as follows:
var imgload =
Copy Code code as follows:
var fundamental = {Count:1};
function Test () {}
Test.prototype = fundamental;
Test.prototype.increase = function () {this.count++;};
var test = new Test ();
Console.log (Test.count);
var test2 = new
1. Lightview
Lightview is a prototype and Script.aculo.us development that creates a modal dialog box that can cover the entire page. The content can be displayed not only in pictures, text, Web pages, through Ajax calls, but also 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.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service