jquery uses document and window which attributes and methods summary _jquery

Source: Internet
Author: User
Tags script tag

Document.activeelement

Gets the element for which the document currently has focus

Document.head

Use in jquery in the following ways Document.head | | document.getElementsByTagName ("Head") [0], visible not all browser support

Document.body

Get the htmlbodyelement element of the current document

Document.compatmode

Gets how the current document is rendered. return value: Backcompat (Quirk mode) and Css1compat (Standard mode).

Because IE 8 up to five rendering modes, it is necessary to determine whether the quirks mode requires the use of IE unique document.documentmode for additional testing

See this article http://www.jb51.net/article/21717.htm

Document.readysate

Returns the loading status of a document: Uninitialized,loading,loaded,interactive,complete All browsers support this property (FF3.6 above).

In standard browsers, normal HTML elements do not have this attribute (except opera's script tag).

The Ready function in jquery uses the complete state value to determine whether the DOM tree is loaded and completed

Document.documentelement

Returns the document root element (htmlhtmlelement)

Document.documentElement.currentStyle

IE unique method, get element style

Document.documentElement.contains ()

ie, used to determine whether a document contains a specified node element

Document.documentElement.compareDocumentPosition ()

Compares the current node to the document location of the specified node IE9 support this method

For specific information see http://www.jb51.net/article/28281.htm

Document.documentElement.doScroll ()

IE unique method, analog user scroll bar click; jquery uses this method to detect whether a DOM tree is available in IE6.

Non-IE can use obj.scrolltop+=10; The applicable elements are HTML, body, Div, span, textarea, etc.

For more information see http://msdn.microsoft.com/en-us/library/ms536414 (vs.85). aspx

Document.defaultview (Domwindow)

Returns the Window object associated with the current document or Null,ie 9 supports this property

Document.defaultView.getComputedStyle ()

Gets the element style information (not inline) and returns the style sheet object. The standard method of the consortium; IE corresponds to the Currentstyle property

Window.frameelement

Gets the host node IFRAME element of the current document

Window.location

Returns the URL information for the current document

Window.execscript ()

The Execscript function is the same as the Eval function, unlike the scope of the script after the Eval function is the current execution context, while execscript is always for the global scope.

The eval and Window.eval functions in IE are the same, and the script scope that Window.eval executes is also the current execution context.

Contact Us

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

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.