页面分左右两块。左边是加工数据,右边是检验数据。数据每页都有很多条。
需要的效果是,选中左边的加工数据,那一行颜色会变,然后自动相对应的检验数据也会找到,那一样颜色变色。
两块都有一个相同列就是编号。应该怎么写啊。如果没问题,会再加分,跪求,谢谢。

解决方案 »

  1.   

    <html>
      <head>
        <base href="<%=basePath%>">
        
        <title>My JSP 'test.jsp' starting page</title>
        
    <meta http-equiv="pragma" content="no-cache">
    <meta http-equiv="cache-control" content="no-cache">
    <meta http-equiv="expires" content="0">    
    <meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
    <meta http-equiv="description" content="This is my page">
    <link rel="Stylesheet" type="text/css" href="jquery-easyui-1.2.6/themes/icon.css" />
    <link rel="Stylesheet" type="text/css" href="jquery-easyui-1.2.6/themes/default/easyui.css" />
        <script type="text/javascript" src="jquery-easyui-1.2.6/jquery-1.7.2.min.js"></script>
    <script type="text/javascript" src="jquery-easyui-1.2.6/jquery.easyui.min.js"></script>
    <!--
    <link rel="stylesheet" type="text/css" href="styles.css">
    -->


      </head>
      
      <body>
       <h1>DataGrid</h1>
       <div>
       <span>
       <table id="tt" class="easyui-datagrid" style="width:500px;height:300px"
    url="datagrid2_getdata.php"
    title="Load Data" iconCls="icon-save"
    rownumbers="true" pagination="true">
    <thead>
    <tr>

    <th field="productid" width="80">Product ID</th>
    <th field="listprice" width="80" align="right">List Price</th>
    <th field="unitcost" width="80" align="right">Unit Cost</th>
    <th field="attr1" width="150">Attribute</th>

    </tr>
    </thead>
    <tbody>                            
            <tr>                           
                <td>Data 1</td>            
                <td>Data 2</td>            
                <td>Data 3</td>            
                <td>Data 4</td>            
                        
            </tr>          
     <tr>                           
                <td>Data 1</td>            
                <td>Data 2</td>            
                <td>Data 3</td>            
                <td>Data 4</td>            
                        
            </tr>  
             
             
    </table>
    </span>
    <span>
    <table id="t2" class="easyui-datagrid" style="width:500px;height:300px"
    url="datagrid2_getdata.php"
    title="Load Data" iconCls="icon-save"
    rownumbers="true" pagination="true">
    <thead>
    <tr>

    <th field="productid" width="80">Product ID</th>
    <th field="listprice" width="80" align="right">List Price</th>
    <th field="unitcost" width="80" align="right">Unit Cost</th>
    <th field="attr1" width="150">Attribute</th>

    </tr>
    </thead>
    <tbody>                            
            <tr>                           
                <td>Data 1</td>            
                <td>Data 2</td>            
                <td>Data 3</td>            
                <td>Data 4</td>            
                        
            </tr>          
     <tr>                           
                <td>Data 1</td>            
                <td>Data 2</td>            
                <td>Data 3</td>            
                <td>Data 4</td>            
                        
            </tr>  
            
             
    </table>
    </span>
    </div>

      </body>
      
    </html>使用了jquery easy ui.
    我自己写的方法如果不用这个ui可以实现,但是使用之后就不行了,不知道怎么弄.跪求高手