Online QQCode. You can scroll with the drop-down of the mouse.
But as long as there is <! Doctype HTML public "-// W3C // dtd xhtml 1.0 transitional // en" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> does not scroll.
This standard does not support writing certain attributes. In the past, the above line of code was removed, but some CSS styles were removed, and today I searched for nothing.
Find this articleArticle: Http://blog.csdn.net/tfgdd/archive/2010/01/12/5182033.aspx
The fixed layer location may be frequently used during page design. In this case, you need to obtain the coordinates of Some HTML objects to set the coordinates of the Target layer more flexibly. document may be used here. body. scrolltop and other attributes, but this attribute
On the XHTML standard webpage or, more simply, with <! Doctype...> the result of the tag page is 0. If you do not use this tag, everything is normal. How can you obtain the body coordinate on the XHTML page? Of course, there is a way-Use
Document.doc umentelement to replace document. Body, which can be written in this way
Example:
VaR Top = document.doc umentelement. scrolltop | document. Body. scrolltop;
| In Javascript is a good thing. Besides being able to be judged by conditions such as if, it can also be used to assign values to variables. The preceding example is equivalent to the following example.
Example:
VaR Top = document.doc umentelement. scrolltop? Document.doc umentelement. scrolltop: Document. Body. scrolltop;
This write can be well compatible.
In contrast, if you do not declare it, document.doc umentelement. scrolltop is displayed as 0.