去找有关滚动条的javascript的例子接下来就是看看 它滚动的text在哪设置然后在jsp 中从数据库取出数据 然后赋值最后就是记得把你滚动调的代码记得copy过去

解决方案 »

  1.   

    GZ!
    strongly recommend you give more score! hehe
      

  2.   

    <%@page contentType="text/html; charset=gb2312"%>
    <jsp:useBean id="cproc" scope="request" class="callproc.callproc">
    </jsp:useBean>
    <body bgcolor="#FFFFFF" text="#000000" background="tkwffile/backleft.gif" leftmargin="80" topmargin="5">
    <%
      String color;
      boolean colorOption;
      String sdate;
      String edate;
      colorOption=true;
      String color1="#CCFFFF";
      String color2="#FFFFCC";
      
      String method=request.getMethod().trim();
      if(!method.toLowerCase().equals("post")){ %>
      <TABLE style="BORDER-COLLAPSE: collapse" borderColor=#111111 
                cellSpacing=8 cellPadding=1 width=77 border=0>
       <TBODY>
       <TR>
        <TD><font size="2">查询条件</font></TD>
       </TR>
       </TBODY>
      </TABLE>
      <TABLE style="BORDER-COLLAPSE: collapse" borderColor=#111111 
                cellSpacing=8 cellPadding=1 width=467 border=0 height="35">
      <TBODY> 
      <TR> 
        <form action="gx_slmb_gslist.jsp" method="POST">
          <TD  align=right width="19%" height="19"> 
            <div align="center"><font size="2">起始时间:</font></div>
          </TD>
          <TD  align=right width="15%" height="19"> 
            <input type="single_line" name="stdate" size="8" maxlength="8" autocomplete=off>
          </TD>
          <TD  align=right width="20%" height="19"> 
            <div align="center"><font size="2">终止时间:</font></div>
          </TD>
          <TD  align=right width="18%" height="19"> 
            <input type="single_line" name="eddate" size="8" maxlength="8" autocomplete=off>
          </TD>
          <TD  align=right width="9%" height="19"> </TD>
          <TD align=right width="19%"> 
            <input type="hidden" name="FormAction" value="submit">
            <input type="submit" name="Submit" value="查询提交">
          </TD>
        </form>
      </TR>
      </TBODY>
    </TABLE>
    <% } else { 
        String formAction=(String)request.getParameter("FormAction");
         if(formAction.equals("submit")){
       sdate=(String)request.getParameter("stdate");
           edate=(String)request.getParameter("eddate");
        if ((!sdate.equals(""))&&(!edate.equals(""))) {
    %>
    <table width="99%" border="1" cellspacing="0">
      <tr>
        <td width="20%" bgcolor="#CCFF99">
      <div align="center"><b>&nbsp;单位码</b></div>
        </td>
        <td width="20%" bgcolor="#CCFF99">
      <div align="center"><b>&nbsp;单位名</b></div>
        </td>
        <td width="20%" bgcolor="#CCFF99">
      <div align="center"><b>&nbsp;件数</b></div>
        </td>
    <td width="20%" bgcolor="#CCFF99">
      <div align="center"><b>&nbsp;金额</b></div>
        </td>
      </tr>
    <%
       cproc.connectdb();
       cproc.gsslmb();
       while(cproc.rslt.next()){
          if(colorOption){
            color=color1;
    colorOption=false;
       }else{
             color=color2;
     colorOption=true;
       }
    %>
      <tr> 
        <td width="20%" bgcolor=<%=color%>><%=cproc.rslt.getString(1)%></td>
     
        <td width="20%" bgcolor=<%=color%>><%=cproc.rslt.getString(2)%></td>
         
        <td width="20%" bgcolor=<%=color%>><%=cproc.rslt.getString(3)%></td>
     
        <td width="20%" bgcolor=<%=color%>><%=cproc.rslt.getString(4)%></td>
      </tr>
    <%
      }
      cproc.rslt.close();
      cproc.stmt.close();
      cproc.con.close();
    %>  
    </table>
    </body>
    <% }}}%>
    --要对那四个getstring用scoll
    more score if you have strong recommend
    what means GZ ,by the way
    同时也感谢'微电'给出建议
      

  3.   

    有没有谁能提供一段固定标题栏的JSP或javascript的相关代码.
    我已经困惑了两天了.你的支持本人感动万分!!!
      

  4.   

    先给你一段html代码,你看看效果,这个效果其实不太好,但是里面滚动的内容不支持<table>标签,没办法。
    <table border="1" width="35%" height="144">
      <tr>
        <td width="100%" height="138">
          <div style="overflow:auto;height:100%">
            aad
            <p>asa</p>
            <p>as</p>
            <p>as</p>
            <p>a</p>
          </div>
        </td>
      </tr>
    </table>
      

  5.   

    还有个办法就是采用内框架,也就是<iframe> 标签。可以完全达到你做需要的效果,但是<iframe> 好像不支持netscape.
    给你个html代码,你先看看效果:
    <table width=100% >
     <tr>
      <td>列1</td>
      <td>列2</td>
      <td>列3</td>
      <td>列4</td>
     </tr>
     <tr>
      <td colspan=4><iframe src="list.jsp" width=100% height=499 scrolling=yes></td>
     </tr>
    </table>
      

  6.   

    看错了 楼上这种解决不错 就是有时会一段空白 还有要记得大小要调好
    不然会出现标题和内容列对不齐还有是不是可以尝试着用textarea来放你内容
      

  7.   

    原本从在当前页显示取数结果时,有两个参数要传给bean.
    现在要用内框架,我的理解:那么这个参数就要从当前a.jsp传给内框架相关的b.jsp,然后由b.jsp传给bean,以实现数据清单在内框架中显示. 请问这个参数传递怎样实现?
    新手上路,真心谢谢各位支持!
      

  8.   

    ronny5的办法果然有用!谢谢
    不过现在又出现了xmvigour说的问题,第一行以及第一列前出现了空白,请问有没有这方面的经验.
    一个解决办法还差最后一步,请多多关照!