The rendering of the box model in IE is very different from the standards mode and quirks mode, and the interpretation of the box model under Standards mode is the same as that of other standard browsers, but in quirks mode, there is a big
The events themselves are fairly intuitive and commonly used:
Event
Describe
Abort
The picture is blocked and cannot be loaded
Blur,focus
Lose focus, get focus
Change
Applies to form
Firefox official web found a set of functions, equivalent to Treewalker, with it can be easily implemented in IE traversal API 2 of all the functions (nextelementsibling,previouselementsibling, Firstelementchild,lastelementchild,children) These
DOM2 style rules for the consortium
==========================================================
Cssstylesheet ObjectsThe Cssstylesheet object represents all CSS style sheets, including external style sheets and embedded style sheets that are
1, stingy your code, with the least code to do the most appropriate thing;
For example, your code uses a lot of document.getElementById (), do you consider writing a simple ID selector
Copy Code code as follows:
function $ (Id)
{
First Look:
Copy Code code as follows:
var objjson={
OP1: ' Objjson option1 ',
Fn1:function () {
Alert (THIS.OP1)
}
}
In this form of declaration, you can access the internal properties directly via OBJJSON.OP1 or
The map used in this article is mapMap Online API Addresshttp://union.mapbar.com/apidoc/Offline CHM format Download address:Http://union.mapbar.com/apidoc/chm/mapbarapi.rar
Effect Chart:
The Mapbar map API allows you to embed Mapbar maps into
1,ie uses the Attachevent/detachevent method to add and remove event listeners, and the Addeventlistener/removeeventlistener method is used by the consortium.
2,ie uses the OnEvent naming method for its events, and the consortium is the name of
background
Both encodeURI and encodeuricomponent are functions defined in the ECMA-262 standard, and all languages that are compatible with this standard (such as JavaScript, ActionScript) implement both functions. They are all global functions
code box can be written in a simple javascript & Lt;input id= "btntest" type= "button" value= "Execute program" onclick= "Return Btn_onclick ()"/>
[Ctrl + A All SELECT Note: If the need to introduce external JS need to refresh
In general, we might use regular expressions to replace text:
Copy Code code as follows:
var a = "ABC123AXC";
A.replace (/a.c/g, ' ZZ ');
We can use functions to define advanced substitutions, rather than a simple string.
Javascript:
Break and continue are two special statements that are used in internal loops.
Use the break statement to jump out of the loop;
Use the continue statement to jump out of the current loop to continue the following values.
return false
javascript detects browser type and version number (compatible with browsers)
[Ctrl + A All SELECT Note: If the need to introduce external JS need to refresh to perform]
Related articles:
JavaScript detects browser types and
Apply and call, which function by binding functions to another object, differ only in the way that the parameters are defined:
Function.prototype.apply (Thisarg,argarray);
Function.prototype.call (Thisarg[,arg1[,arg2 ...]);
As you can see from the
Problem:
On the page, the user will have a lot of action, each operation we need to show the results of the operation, where we have a problem, how should we show different results? In the process of presentation we also have to consider when the
To create compliant web pages, the DOCTYPE declaration is an essential component; Unless your XHTML determines a correct DOCTYPE, your logo and CSS will not work, and the value of JS can also be affected.
DOCTYPE declared as follows:
DOCTYPE
Just sorted out some of the JavaScript cookies on the operation of the article, found that this article is also good, recommended that everyone together for reference, select the need, the lack of place is mainly on the path of the setting, like
You may also often encounter so summarized as follows:Creation of 1,dom elementsInsertion of 2,dom elements3,dom element substitutionDeletion of 4,dom elementsFirst, there are some simple DOM elements on the pageaaaaaaaabbbbbbbbcccccccccNext we
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.