在取出数据数据后让它滚动却无法实现,代码如下 
<tr>

                  <td height="221" align="center" valign="top" background="image/index1.5.gif"><table width="90%" border="0" cellpadding="0" cellspacing="0" class="li" id="Table">                      <tbody>
 <marquee scrollAmount=5 direction=up width=210 onmouseover=stop() onmouseout=start()>
  <%
  String sql_n="select * from wordnews where typeid=1003 order by crtime desc limit 10"; 
  ResultSet rs2=stmt.executeQuery(sql_n);
                      while(rs2.next()){
   int idx = rs2.getInt("id");
                       String title_n = rs2.getString("title");
   title_n = getString(title_n);
   String titlex = title_n;
   int lenx = title_n.length();
   if(lenx >13)
   {
     String tmp_title = title_n.substring(0,11);
 title_n = tmp_title + "...";
   }    
  %>
                        <tr>
                          <td width="85%" height="22" align="left" valign="middle"><li><a title="<%= titlex%>" href="/bzj/newsnotices.jsp?id=<%= idx%>" target="_blank"><%=title_n%></a></li></td>
                        </tr>
                      <%}%> 
  </marquee>
                        <tr>
                          <td height="22" align="right" valign="middle"><a href="notice.jsp" target="_blank">更多&lt;&lt;</a></td>
                        </tr>                      </tbody>
                    </table></td>
                </tr>

解决方案 »

  1.   

    我测试的是可以的,测试代码如下:
    <%String str="sssss"; %>
        <marquee scrollAmount=5 direction=up width=210 onmouseover=stop() onmouseout=start()>
     <a title="<%= str%>" href="/bzj/newsnotices.jsp?id" target="_blank"><%=str%></a>
      

  2.   

    貌似你把marquee固定死了在表格里了的原因吧
      

  3.   

    你看看生成的html的源代码吧。特别是那些换行,双引号,小于号大于号之类的。必要是做一些替换操作。
      

  4.   

    已经好了 根据KOOK_OKKO的提示