Yesterday I encountered a problem when I added a module similar to the "QQ online customer service" function using ASP: The function is basically implemented, but the dialog box does not scroll along with the scroll bar, after carefully studying the code, I finally found out the problem. Haha, and are actually in the first line. In Dreamweaver 8.0, I directly created a first behavior in the HTML file era code. <! Doctype HTML public "-// W3C // dtd html 4.01 transitional // en" "http://www.w3.org/TR/html4/loose.dtd">, Oh, by default for <! Doctype HTML public "-// W3C // dtd xhtml 1.0 transitional // en" http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd ">, carefully compare the source code below to know the problem is out of the" http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd ", you can delete it.
The following ASP code can be directly copied to run:
<! Doctype HTML public "-// W3C // dtd html 4.0 transitional // en">
<HTML> <Meta http-equiv = Content-Type content = "text/html; charset = Unicode">
<Meta content = "mshtml 6.00.20.0.4186" name = generator> <Body>
<Div id = divstay style = "position: absolute">
<Table cellspacing = 0 cellpadding = 0 width = "100%" border = 0>
<Tbody>
<Tr>
<TD valign = top width = "7%"> </TD> </tr> </tbody> </table> </div>
<Script language = JavaScript>
Function picsize (OBJ, maxwidth ){
IMG = new image ();
IMG. src = obj. SRC;
If (IMG. width> maxwidth)
{
Return maxwidth;
}
Else
{
Return IMG. width;
}
}
Function closeqq ()
{
Divstaytopleft. style. Display = "NONE ";
Return true;
}
VaR online = new array ();
</SCRIPT>
<Div id = divstaytopleft style = "position: absolute">
<Table cellspacing = 0 cellpadding = 0 width = 109 border = 0>
<Tbody>
<Tr>
<TD colspan = 3> <a onclick = closeqq () href = "javascript:;" shape = circle
Coords = 91,16, 12> Usemap = # map border = 0> </a> </TD> </tr>
<Tr>
<TD width = 6> </TD>
<TD valign = top width = 96 background = "">
<Table cellspacing = 0 cellpadding = 0 width = 90 align = center border = 0>
<Tbody>
<Tr>
<TD Height = 30>
<Table cellspacing = 0 cellpadding = 0 width = 90 border = 0>
<Tbody>
<Tr>
<TD> Width = 16> <SPAN class = font_12> <Span
Style = "font-size: 9pt "> customer service </span> </TD> </tr> </tbody> </table> </TD> </tr>
<Tr>
<TD>
<Table id = table47 cellpadding = 2 width = "100%" border = 0>
<Tbody>
<Tr>
<TD valign = top width = 15 Height = 23> Src = "index_files/qq_v01.gif" width = 16 border = 0> </TD>
<TD valign = bottom>
<SCRIPT> document. Write ("<a target = blank href = Tencent: // message /? Uin = 178010108 & Site = Ali West & menu = Yes> </a> "); </SCRIPT>
</TD> </tr> </tbody> </table> </TD> </tr>
<Tr>
<TD> </tr>
<Tr>
<TD>
<Table id = table47 cellpadding = 2 width = "100%" border = 0>
<Tbody>
<Tr>
<TD valign = top width = 15 Height = 23> Src = "index_files/qq_n01.gif" width = 16 border = 0> </TD>
<TD valign = bottom>
<SCRIPT> document. Write ("<a target = blank href = Tencent: // message /? Uin = 178160088 & Site = webpage effects & menu = Yes> </a> "); </SCRIPT>
</TD> </tr> </tbody> </table> </TD> </tr>
<Tr>
<TD> </tr> </tbody> </table> </TD>
<TD width = 7> </TD> </tr>
<Tr>
<TD colspan = 3> Width = 109> </TD> </tr>
<Tr>
<TD colspan = 3> Width = 109> </TD> </tr> </tbody> </table> </div>
<SCRIPT type = text/JavaScript>
Function floattop ()
{
VaR startx1 = Document. Body. offsetWidth-125, starty1 = 5;
VaR startx2 = 0, starty2 = 95;
VaR NS = (navigator. appname. indexof ("Netscape ")! =-1 );
VaR d = document;
Function ml (ID, startx, starty)
{
VaR El = D. getelementbyid? D. getelementbyid (ID): D. All? D. All [ID]: D. Layers [ID];
If (D. layers) El. Style = El;
El. sp = function (x, y) {This. style. Left = x; this. style. Top = y ;};
El. x = startx;
El. Y = starty;
Return El;
}
Window. staytopleft = function ()
{
VaR py = NS? Pageyoffset: Document. Body. scrolltop;
Ftlobj. Y + = (PY + starty1-ftlobj. Y)/8;
Ftlobj1.y + = (PY + starty2-ftlobj1.y)/8;
Ftlobj. Sp (document. Body. scrollleft + document. Body. offsetWidth-125, ftlobj. y );
Ftlobj1.sp (ftlobj1.x, ftlobj1.y );
SetTimeout ("staytopleft ()", 30 );
}
// Ftlobj = ML ("divstay", document. Body. scrollleft + document. Body. offsetWidth-125, 0 );
// Ftlobj1 = ML ("divstaytopleft", 0, 30 );
Ftlobj = ML ("divstay", (document. Body. scrollleft + document. Body. offsetwidth)/2 + rows, 0 );
Ftlobj1 = ML ("divstaytopleft", (document. Body. scrollleft + document. Body. offsetwidth)/2 + limit, 30 );
Staytopleft ();
}
Floattop ();
</SCRIPT>
<! -- End: QQ online customer service -->
<P> </P>
<P> </P>
<P> </P>
<P> </P>
<P> </P>
<P> </P>
<P> </P>
<P> </P>
<P> </P>
<P> </P>
<P> </P>
<P> </P>
<P> </P>
<P> </P>
<P> </P>
<P> </P>
<P> </P>
<P> </P>
<P> </P>
<P> </P>
<P> </P>
<P> </P>
<P> </P>
<P> </P>
<P> </P>
<P> </P>
<P> </P>
<P> </P>
</Body>