<! Doctype HTML public "-// W3C // dtd xhtml 1.0 transitional // en" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
This makes onscroll events unavailable for pages that comply with W3C standards, that is, onscroll events do not comply with W3C standards.
Many directly Delete the preceding statement and write it in the body as follows:
<Body onscroll ="
Floater. style. Top = Document. Body. scrolltop + document. Body. clientHeight-oip.offsetHeight;
">
<Div id = "floater"> </div>
Other attributes of floater, such as color, width, and height, can be written directly in CSS.
The result is that the onscroll event can be executed, but the structure of my page is disrupted due to the lack of the W3C standard. So... This cannot be used.
I use the following method:
<SCRIPT type = "text/JavaScript">
Function divmove ()
{
VaR floater = Document. getelementbyid ("floater"); // this can be done without writing.
Floater.style.top?document.documentelement.scrolltop=document.doc umentelement. clientHeight-floater.offsetHeight;
}
</SCRIPT>
BodyCodeIs
<Body onload = "window. setinterval (divmove, 150);">...