jquery 定位元素几种方法

<html>
  <table class=”ed”>
    <tr>
      <td><input type="text"></input></td>
      <td><input type="text"></input></td>
      <td><input type="button"></input></td>
      <td><input type="text"></input></td>
    </tr>
  </table>
</html>

需要定位到第三个文本框的时候:

$(“.ed input:text)”).eq(3)

$(“.ed input:text:eq(3)”)

$(“.ed input[type=”text”]”).eq(3)

$(“.ed input[type=”text”]:eq(3)”)

posted @ 2011-12-01 09:32  YOUK  阅读(7782)  评论(0编辑  收藏  举报