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)”)

原文地址:https://www.cnblogs.com/youk/p/2270024.html