Node positioning is to obtain the location of an element.
Functions related to node locating in jquery are:
$. Prototype. offset
$. Prototype. Position
In Dom programming, W3C has defined a series of Members used to locate nodes:Offsetleft
Someone may smile when they see the title. I don't know the JSON!
Although JSON is often used, many users may confuse JavaScript objects and JSON objects.
JSON is a typeIs a lightweight data exchange format, whose full name isJavaScript
The concept of event delegation is clear to everyone. If you use an elementMouseover/mouseoutIt is very likely that the event is passively delegated. All child elements in this element will triggerMouseover/mouseoutIn addition, you cannot stop
Nothing happened recently. it is often seen that some representatives may not be able to pass the examination. Therefore, some representatives are also provided for your consideration, sorry, I can still see it ......
Event details ---calendar.
ArticleDirectory
Relative browser window
Relative document
In some Dom operations, we often deal with the location of elements, and a common aspect of mouse interaction, it is disappointing that different browsers may have
I. multiple choice questions
1. Which of the following statements will generate a running error? ()
A. var OBJ = ();
B. var OBJ = [];
C. var OBJ = {};
D. var OBJ = //;
2. Which of the following words does not belong to a reserved JavaScript word? (B)
I. Declaration string:VaR normal_monkey = "I am a monkey! ";Document. writeln ("normal monkey" + normal_monkey );
VaR bold_monkey = normal_monkey.bold ();Document. writeln ("bold monkey" + bold_monkey );
The declaration here: var bold_monkey =
Transferred from: bytes
Visible area height: Document. Body. clientheight
Visible area width of the webpage: Document. Body. offsetwidth (including the width of the edge)
Visible area height of the webpage: Document. Body. offsetheight (including
Visible area width of the webpage: Document. Body. clientwidth
Visible area height: Document. Body. clientheight
Visible area width of the webpage: Document. Body. offsetwidth (including the width of the edge)
Visible area height of the webpage:
Use JavaScript to implement the agent (right-click menu) Since the context menu is displayed, We need to intercept the event oncontextmenu when right-clicking the genie. Then, encapsulate the HTML of the right-click menu into a function. At first,
//
* ***** Cookie operation ********
//
From Sina
//
Add new cookie
Function
Setcookie (Key, value, expireday)
{ If (Expireday) { VaR Date = New Date ();Date. settime (date. gettime () + Expireday * 24
Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/-->
Doctype HTML public
"
-// W3C // dtd xhtml 1.0 transitional // en
"
"
Http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd
"
>
I have made an example for you. You can run main.htmand click the button in B .htmto execute the myform () function in a.htm.
---Main.htm ----
small example
-----A.htm ------
Http://cnfsco.126.com
----B.htm ----
The so-called event mechanism is a function used to implement event-related functions. Generally, we need three functions to operate events:BindUnbindRun
For exampleELEM. On ('click', FN );
All JS frameworks provide event functions
Speaking of the built-in JavaScript type, Boolean number string object Regexp Function Array date undefined null is known.
However,
That's all?
There are actually three types
These three types are the types used by JavaScript actuators and
Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--> 1 Doctype HTML public "-// W3C // dtd xhtml 1.0 transitional // en" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd" > 2 Html
1: javascript events:
If a Javascript script is added to a hyperlink, javascript: Must be added before the script, and other features such as botton do not need to be added. Why.
FFFF
Because
The onclick of 'btnquery' is an event.
In the previous section, we briefly introduced how to use JavaScript to write constructor functions. Now we can understand the principles of JavaScript constructor, mainly focusing on the concept of prototype. First of all, we can see the
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