A frame embedded as an IFRAME acts as a scrolling browser.

Source: Internet
Author: User

Code snippet:

<Body leftmargin = "0" topmargin = "0" marginwidth = "0" marginheight = "0">
......

<SCRIPT>
VaR actualwidth = '';
VaR copyspeed = 2;
VaR Part1, Part2;
Function fillup (){

// They are used to obtain data cyclically:
Part1 = Document. All. Part2; // The first display box
Part2 = Document. All. Part3; // The second display box.
Actualwidth = part1.offsetwidth;
Part2.style. Left = actualwidth + 20;
Lefttime = setinterval ("slideleft ()", 30 );
}
Window. onload = fillup;

Function slideleft (){
If (parseint (part1.style. Left)> (actualwidth * (-1) + 5 ))
Part1.style. Left = parseint (part1.style. Left)-copyspeed;
Else
Part1.style. Left = parseint (part2.style. Left) + actualwidth + 5;

If (parseint (part2.style. Left)> (actualwidth * (-1) + 5 ))
Part2.style. Left = parseint (part2.style. Left)-copyspeed;
Else
Part2.style. Left = parseint (part1.style. Left) + actualwidth + 5;
}
</SCRIPT>
<Div style = "position: absolute; width: 718; Height: 205; Vertical-align: Top" onmouseover = "copyspeed = 0" onmouseout = "copyspeed = 2">
<Div id = "Part2" style = "position: absolute; left: 0; top: 0">
<Table> <tr>
<% IF (Ds! = NULL ){
While (Ds. Next ()){
%>
<TD>
<Table width = "130" border = "1" cellpadding = "0" cellspacing = "0">
<! -- Dwlayouttable -->
<Tr>
<TD Height = "128" valign = "TOP"> <input type = "image" onclick = "window. open ('<% = apppath %>/poll/index. JSP ', ''); return;" src = "<% = apppath + Ds. getstring ("mpath") %> "width =" 128 "Height =" 128 "> </TD>
</Tr>
<Tr>
<TD Height = "68" valign = "Middle"> <span style = "font-size: 12px; color: # f22bed; line-Height: 24px;"> & nbsp; & nbsp; /poll/images/index_24.gif"
Width = 7 Height = 7 alt = ""> & nbsp; <% = codefilter. killnull (Ds. getstring ("gamename") %> <br>
& Nbsp; /poll/images/index_24.gif" width = 7 Height = 7 alt = ""> & nbsp; current number of votes: <% = Ds. getstring ("hits") %> <br>
& Nbsp; /poll/images/index_24.gif" width = 7 Height = 7 alt = ""> & nbsp; from: <% = codefilter. killnull (Ds. getstring ("District") %> </span> </TD>
</Tr>
</Table>
</TD>
<%
}
} %>
</Tr> </table>
</Div>
<Div id = "Part3" style = "position: absolute; left:-1000; top: 0">
<Table> <tr>
<% IF (Ds! = NULL ){
DS. beforefirst ();
While (Ds. Next ()){
%>
<TD>
<Table width = "130" border = "1" cellpadding = "0" cellspacing = "0"
<Tr>
<TD Height = "128" valign = "TOP"> <input type = "image" onclick = "window. open ('<% = apppath %>/poll/index. JSP ', ''); return;" src = "<% = apppath + Ds. getstring ("mpath") %> "width =" 128 "Height =" 128 "> </TD>
</Tr>
<Tr>
<TD Height = "68" valign = "Middle"> <span style = "font-size: 12px; color: # f22bed; line-Height: 24px;"> & nbsp; & nbsp; /poll/images/index_24.gif"
Width = 7 Height = 7 alt = ""> & nbsp; <% = codefilter. killnull (Ds. getstring ("gamename") %> <br>
& Nbsp; /poll/images/index_24.gif" width = 7 Height = 7 alt = ""> & nbsp; current number of votes: <% = Ds. getstring ("hits") %> <br>
& Nbsp; /poll/images/index_24.gif" width = 7 Height = 7 alt = ""> & nbsp; from: <% = codefilter. killnull (Ds. getstring ("District") %> </span> </TD>
</Tr>
</Table>
</TD>
<%
}
} %>
</Tr> </table>
</Div>
</Div>

......
</Body>

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.