Which attributes and methods of document and window are used in jQuery? _ jquery

Source: Internet
Author: User
Common examples such as document. getElementById () and object. addEventListener () are not listed. Document. activeElement: obtains the document element with the current focus. the following document describes how to use head in jQuery. head | document. getElementsByTagName ("head") [0]. It can be seen that not all browsers support document. body to obtain the HTMLBodyElement document of the current document. compatMode

Obtain the rendering method of the current document. Returned values: BackCompat (odd mode) and CSS1Compat (standard mode ).

As Internet Explorer supports up to five batch models, the so-called batch mode is a strange pattern. It facilitates the unique document.doc umentMode of Internet Explorer for additional detection.

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

Document. readySate

Returned file loading status: uninitialized, loading, loaded, interactive, and complete all browsers support this attribute (FF3.6 or above ).

In a standard browser, common HTML elements do not have this attribute (except for the script tag of Opera ).

The ready function in jQuery uses the complete status value to determine whether the DOM tree is fully loaded.

Document.doc umentElement returns the document root element (HTMLHtmlElement) document.doc umentElement. currentStyleIE exclusive method, get the element style document.doc umentElement. contains () IE is used to determine whether the document contains the specified node element document.doc umentElement. compareDocumentPosition ()

This method is supported by comparing the current node with the specified node's document location IE9.

See http://www.jb51.net/article/28281.htm for details

Document.doc umentElement. doScroll ()

The unique method of IE is used to simulate clicking on the user's scroll bar. jQuery uses this method to check whether the DOM tree is available in ie6.

Non-IE can use obj. scrollTop + = 10; applicable elements include html, body, p, 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 attribute document. defaultView. getComputedStyle () obtains the element style information (not inline) and returns the style table object. W3C standard method; IE corresponds to the currentStyle attribute window. frameElement to obtain the iframe element window. location of the host node of the current document. Return the URL Information of the current document window.exe cScript ()

The execScript function and eval function have the same functions. The difference is that the scope of the script after eval function execution is the current execution context, while execScript always applies to the global scope.

In IE, the eval and window. eval functions are the same. The script scope executed by window. eval is also the current execution context.

Related Article

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.