1 <tr>
2 <td height="50px" valign="top" align="left">
3 <div id="up"
4 style="width: 350px; background-image: url('index/cbg.gif')">
5 <div id="inup1">
6 <div id="up1">
7 <table border="0" cellpadding="4"
8 cellspacing="0" align="center">
9 <%
10 i = 0;
11 %>
12 <logic:notEmpty name="link">
13 <logic:iterate id="link" name="link"
14 type="com.website.struts.entity.Link">
15 <%
16 if ((i % 3) == 0) {
17 if (i != 0) {
18 out.println("</td>");
19 out.println("</tr>");
20 }
21 %>
22 <tr>
23 <td>
24 <a
25 href="<bean:write property="url" name="link"/>"><img
26 border="0"
27 src=<bean:write property="logo" name="link" />
28 width="100px" height="50px"> </a>
29 <%
30 } else {
31 %>
32
33 <td>
34 <a
35 href="<bean:write property="url" name="link"/>"><img
36 border="0"
37 src=<bean:write property="logo" name="link" />
38 width="100px" height="50px"> </a>
39 </td>
40 <%
41 }
42 i++;
43 %>
44
45 </logic:iterate>
46 </logic:notEmpty>
47 <%
48 out.println("</td>");
49 out.println("</tr>");
50 %>
51 </table>
52 </div>
53 <div id="up2"></div>
54 </div>
55 </div>
56 <script>
57 <!--
58 var upspeed=10; //数字越大速度越慢
59 var uptab=document.getElementById("up");
60 var uptab1=document.getElementById("up1");
61 var uptab2=document.getElementById("up2");
62 uptab2.innerHTML=uptab1.innerHTML; //克隆demo1为demo2
63 function upMarquee(){
64 if(uptab2.offsetTop-uptab.scrollTop<=0)//当滚动至demo1与demo2交界�?
65 uptab.scrollTop-=uptab1.offsetHeight //demo跳到��顶端
66 else{
67 uptab.scrollTop++
68 }
69
70 }
71 var upMar=setInterval(upMarquee,upspeed);
72 uptab.onmouseover=function() {clearInterval(upMar)};//鼠标移上时清除定时器达到滚动停止的目�?
73 uptab.onmouseout=function() {upMar=setInterval(upMarquee,upspeed)};//鼠标移开时重设定时器
74 -->
75 </script>
76 </td>
77 </tr>