<table id="table1">  //第一个问题;
  <tbody>
    <tr>
      <td class="td1">  //第二个问题;
        <table>
        </table>
      </td>
     <td>  //第三个问题;
     </td>
    </tr>
  </tbody>
...
</table>
我想用JQuery分别实现以下几个功能:1. 隐藏table1;2. 只隐藏table1下面的class=td1的内容;3. 只隐藏第二个td内容;

解决方案 »

  1.   

    jquery用的不是CSS选择符么!你只要会CSS不难吧
      

  2.   

    我不会jquery.对着1.3找到
    1.$("#table1").hide() 
    2.$("td.td1").hide() 
    3.$("tr td:second").hide()
      

  3.   

    1.$("#table1").hide()  
    2.$("td.td1").hide()  
    3.$("tr td:second").hide()
      

  4.   

    1.$("#table1").hide() 
    2.$("td.td1").hide() 
    3.$("tr td:second").hide()
      

  5.   

    我顶,有:second选择符?
    $("tr td:eq(1)").hide()
      

  6.   

    1.4:$("#table1").hide();
    $(".td1").hide();
    $("tr td:nth-child(2)").hide();
      

  7.   

    1.$("#table1").hide()  
    2.$("td.td1").hide()  
    3.$("tr td:second").hide()
      

  8.   

    谢谢大家,但是第三个答案是错误的。3. 只隐藏第二个td内容:我的意思是只隐藏<table id="table1"> 下第二个td。
      

  9.   

    还是不对啊,整个页面有很多类似的Tr td
    应该通过table1 作为父节点来引用吧?