Use documentElement to correctly obtain the size of the current visible area. documentelement
Other methods are not applicable. Only this documentElement can correctly obtain the size of the current visible area.
var w =
1, the difference of scrolltop under each browserIE6/7/8:For pages that do not have DOCTYPE declarations, Document.body.scrollTop can be used to obtain scrolltop heights ;For pages that have DOCTYPE declarations, you can use document.documentElement.
Source:Obtains the height and width of the current browser window.Solution text:Solution Process:About document.doc umentElement:W3c: This is a convenience attribute that allows direct access to the child node that is the root element of the
Document represents the entire document (for a webpage, including the entire webpage structure );
Document.doc umentelement is the root node of the entire document node tree, which is an HTML tag on the webpage;
Document. body is the body node in
Directory:
Introduction
Bind an xml document to the treeview Control
Filter xml data
Perform drag-and-drop operations
Delete, rename, and insert
Treeview control in use
With xml and xpath, you can easily add drag-and-drop or even more features to
Typeof document. compatmode is used here! = 'Undefined' & document. compatmode! = 'Backcomput' indicates that the page rendering method is defined and the standard compatibility mode is enabled. Here, the document.doc umentelement is obtained when
The flash of XHTML brings a lot of problems. It aims to make HTML more like XML, so it is called XHTML. However, the engineer did not take the lead. Let's discuss how to determine that the document is XML.
In my impression, jquery has repeatedly
The file object model (DOM) is an application interface (API) that represents the various elements of a document (such as HTML and XML) and accesses and operations ). Generally, all browsers that support Javascript support DOM. The DOM involved 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.